Skip to content

Launch services on kubernetes from a docker-compose.yml

License

Notifications You must be signed in to change notification settings

cllunsford/kumpose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kumpose

Build Status

Kumpose converts docker-compose.yml files into kubernetes configurations. This is still a prototype project; don't point it at anything valuable.

Usage

# Convert 'docker-compose.yml' and print kubernetes JSON to stdout
$ kumpose

# Provide a path to the 'docker-compose.yml' and pipe to kubectl
$ kumpose -f path/to/docker-compose.yml | kubectl create -f -

Mapping Logic

When there is no ambiguity, Kumpose maps docker-compose parameters directly to the equivalent Kubernetes parameter.

Kumpose defaults to mapping each docker-compose service to a Kubernetes Deployment object. This will be configurable in the future to allow conversion to RC, Pod, Job, or DaemonSet.

For Kubernetes features that are not available in docker-compose, kumpose implements the following default values. Future versions may allow these to be provided as flags when calling kumpose:

  • ImagePullPolicy - IfNotPresent
  • Replicas - 1

docker-compose parameters Not Yet Implemented:

  • aliases
  • cgroup_parent
  • container_name
  • cpu_quota
  • cpu_shares
  • cpuset
  • devices
  • depends_on
  • dns
  • dns_search
  • domainname
  • env_file
  • expose
  • external_links
  • extra_hosts
  • ipc
  • labels
  • links
  • logging (v2)
  • log_driver (v1)
  • log_opt (v1)
  • mac_address
  • mem_limit
  • memswap_limit
  • net (v1)
  • network_mode (v2)
  • networks (v2)
  • pid
  • read_only
  • restart
  • security_opt
  • stop_signal
  • stdin_open
  • ulimits
  • user
  • volumes
  • volume_driver
  • volumes_from

Notes

Currently importing k8s.io/kubernetes/pkg/api which is not designed for external consumption. This increases the number of files imported and build times. Will switch to versioned golang API once available (kubernetes/kubernetes#5660).

Prior Art

License

Chris Lunsford (c) 2016 - MIT License

About

Launch services on kubernetes from a docker-compose.yml

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages