kompose is a tool to help users familiar with docker-compose move to Kubernetes. It takes a Docker Compose file and translates it into Kubernetes resources.
View the project on GitHub kubernetes/kompose
Watch Star ForkKompose is a conversion tool for Docker Compose to container orchestrators such as Kubernetes (or OpenShift).
Why do developers love it?
docker-compose.yaml with one simple command kompose convertkompose upkompose downkompose up$ wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose-v3.yaml
$ kompose up
We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead.
INFO Successfully created Service: redis
INFO Successfully created Service: web
INFO Successfully created Deployment: redis
INFO Successfully created Deployment: web
Your application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods,pvc' for details.
$ kubectl get po
NAME READY STATUS RESTARTS AGE
frontend-591253677-5t038 1/1 Running 0 10s
redis-master-2410703502-9hshf 1/1 Running 0 10s
redis-slave-4049176185-hr1lr 1/1 Running 0 10s
A more detailed guide is available in our getting started guide.
Grab the Kompose binary!
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.16.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.16.0/kompose-darwin-amd64 -o kompose
chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose
Windows: Download from GitHub and add the binary to your PATH.