Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dohsimpson/docker2kube
TypeScript lib to convert docker-compose to kubernetes
https://github.com/dohsimpson/docker2kube
docker docker-compose kubernetes typescript
Last synced: about 2 months ago
JSON representation
TypeScript lib to convert docker-compose to kubernetes
- Host: GitHub
- URL: https://github.com/dohsimpson/docker2kube
- Owner: dohsimpson
- Created: 2023-07-14T03:13:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-22T21:10:10.000Z (11 months ago)
- Last Synced: 2024-12-08T03:27:49.399Z (about 2 months ago)
- Topics: docker, docker-compose, kubernetes, typescript
- Language: TypeScript
- Homepage: https://docker2kube.app.enting.org
- Size: 255 KB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker2kube (d2k)
d2k is a typescript library that converts docker-compose YAML files to Kubernetes YAML file. The goal is to make it easy to deploy docker project on Kubernetes.
# UI
Visit https://docker2kube.app.enting.org/ to perform conversion online.# Installation
NPM: `npm i docker2kube`YARN: `yarn add docker2kube`
# Usage
```javascript
import { convert } from 'docker2kube';const composeYaml = `\
version: '3'services:
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
restart: always
`;const output = convert(composeYaml);
console.log(output);
```# Acknowledgment
* [kompose](https://github.com/kubernetes/kompose) is the canonical tool for converting docker-compose templates. And inspired this project.
* [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) makes working with JSON schema a dream.
* [composerize](https://github.com/magicmark/composerize) for converting docker command.