Skip to content

dohsimpson/docker2kube

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages