Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1017 Bytes

README.md

File metadata and controls

39 lines (28 loc) · 1017 Bytes

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

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