Convert Compose to Kubernetes
1.6.0 of Kompose!
Here's what's new in this release:
--controller
in kompose up
and kompose down
(https://github.com/kubernetes/kompose/pull/837)--controller
paramater added to up/down:
In an effort to make commands between kompose convert
and kompose up/down
even, we've added the ability to specify a controller when running the up/down
command.
$ kompose up --controller=daemonset
Many thanks to those who've contributed to this months release!
Linux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.6.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.6.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | 041efae7cb95c13a9814626c85ba94fa552512d4ec86db6e43d2ee498be4e218 |
kompose-darwin-amd64.tar.gz | cfef47e628e2043a01143699b6402f78555e1eafc479eef4bc63dddbad5c4251 |
kompose-linux-amd64 | 7965c1f8bec8226437058e24fc3f2929ad20bff6df5aa343e28c8e1848419ea9 |
kompose-linux-amd64.tar.gz | 0e48b92c124edf2d1dfbb604f2a13e475e1f284b1e84030a3526cf844cd9573d |
kompose-linux-arm | 67af8118975116b1ac74c1291d232a78cad3c8a70bfeb47205889355a9c7bd35 |
kompose-linux-arm.tar.gz | ef777feb3727115ebd8bd4a37abd199e222e8d43371d6d619708ff5d76c670c5 |
kompose-windows-amd64.exe | c091ace8e5cb1906403ff11969e030ea8b03d371fb47b13c910cc916c53be9a5 |
kompose-windows-amd64.exe.tar.gz | f317ff0839455d21b24f25e87b7bee25fabd41bcba3a493eb619d4a3a7b11917 |
1.5.0 of Kompose!
Here's what's new in this release:
Manually define a PersistentVolumeClaim size:_
By default Kompose will create a 100Mi Volume Claim. We've added another label in order manually specify a default volume size.
version: '3'
services:
nginx:
image: nginx
labels:
kompose.volume.size: 500Mi
volumes:
- /foo:/bar
Thanks to everyone who have contributed to this months release!
Linux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.5.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.5.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | f5ed0ac246a2bb6fa59467aa62a3f460f6de19a2bd61ada091ca33cb60748d02 |
kompose-darwin-amd64.tar.gz | f8d80519f26af47f832f0ff5fad32ffd5d226d22fbf654e5bc87c06dfa19545c |
kompose-linux-amd64 | b36df6b05f4f4fc5c2dd93b80e048d0e5cc03c177efe397b9a10a6c1b87be5f0 |
kompose-linux-amd64.tar.gz | d168a186b20ccfc44bfffe9693a4298942da1ec5f6ad2163aa8710d6673ab9ea |
kompose-linux-arm | 2394169cf44c54b9c85a823c4f7e20d20b022e4252736a83ed5bd2efd303ba23 |
kompose-linux-arm.tar.gz | 3527134d65af15197d737b74b32f9d442931b89fefc16e72e1c0b764da392ce5 |
kompose-windows-amd64.exe | 154f59f92039066beae0e0f82d18a7740a41d16c7d466c5f9b3d15031ecd6594 |
kompose-windows-amd64.exe.tar.gz | e08cecfcd9ae1d5dd5ee52b2c11fb21210ae1cef8a7ca02bbb1afb498768bc42 |
1.4.0 of Kompose
A small (minor) release this month!
Changes:
--help
page for kompose up
to reflect differences in CLI paramters between OpenShift and KubernetesLinux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.4.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.4.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | 49d4c946e24ddf8880a97163ddaadd4dc94c69dc0461c1c628ed591b5ac47428 |
kompose-darwin-amd64.tar.gz | 3f9d13f90e9dfbb6906c07f7dfb1b67594710f28ed1c29b7ad9f13038a121381 |
kompose-linux-amd64 | e22d554da0cae3126b094ece38c7188f68d5142869afb263dc6254a45d41f860 |
kompose-linux-amd64.tar.gz | 0647a04230a1ff1bdaec9e9cb42eaf822626b38eee5d33455971dbc6b0a3e048 |
kompose-linux-arm | 6857030d62c1955f0993a8b7f8683705eba6390f5ca3fc2d3dcde49779d394f8 |
kompose-linux-arm.tar.gz | b52f0b7b8f72c0db9de95b283c717085f51f2981ea35fc7d369cc3c9d511f476 |
kompose-windows-amd64.exe | fead05474cba530500c8eb4da02682116dda097015bb55761deec52ecb6a417f |
kompose-windows-amd64.exe.tar.gz | da99a9d23c4e741de09e868dcf8d127f018ea31fb4736f526ba9975da3344dc4 |
1.3.0 of Kompose!
What's new in 1.3.0?
New keys:
env_file
key is now supported. A ConfigMap will automatically be generated alongside your other Kubernetes artifactsplacement: contraints
is now supportedNew CLI paramaters:
--controller
parameter has been added, deprecating --daemon-set
, --deployment
, and --replication-controller
--build-branch
and --build-repo
has also been added to kompose up
to coincidence with the same parameters in kompose convert
Other:
env_file
:
The env_file
key will now correctly convert to it's Kubernetes equivilant. A ConfigMap will be generated.
For example:
version: '3'
services:
redis:
image: 'bitnami/redis:latest'
environment:
- ALLOW_EMPTY_PASSWORD=no
# Env file will override environment / warn!
env_file:
- "foo.env"
- bar.env
labels:
kompose.service.type: nodeport
ports:
- '6379:6379'
To:
apiVersion: v1
data:
ALLOW_EMPTY_PASSWORD: "yes"
kind: ConfigMap
metadata:
creationTimestamp: null
name: foo-env
placement
:
Placement key will now convert to it's Kubernetes equivilant (with constraints).
This only works for specifying a node as well as an operating system.
For example:
version: '3'
services:
db:
image: postgres
deploy:
placement:
constraints:
- node.hostname == machine
- engine.labels.operatingsystem == ubuntu 14.04
Thanks again to all whom contributed to this months release!
Linux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.3.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.3.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | 878399716ddde73e03d204dadd76af73c30e8eda41d7df5815ddd76ff7193cb0 |
kompose-darwin-amd64.tar.gz | bc577affd210c89830cae9f12cd370c00d70af63669bd069e8a5a94e569306ed |
kompose-linux-amd64 | 615e35f51ab5e477252cecc3aa40bddc5a5a5a316cdb8143785c876b9b81a6c2 |
kompose-linux-amd64.tar.gz | b8d48d1f52b88390b8068cf9db0924d74fb24471ca6a601af72a9f19e42515ff |
kompose-linux-arm | bd62ee2233f8410344be6a90117da6d6aeff7f15928f7b5fe04c9eb3a30c822e |
kompose-linux-arm.tar.gz | 81f73d3bb2ad7193a679726f6d765aaa406f9a570f9be4ad40337d7b182e2bc7 |
kompose-windows-amd64.exe | 2af9fbcc05eafd2ca6d527fdb1cf1219df5ab1d145d856d1d6ea01f2fb4aa6ed |
kompose-windows-amd64.exe.tar.gz | 0959c3a3efd5570ec771d87b1d84ad697b12cf84e094de000cdc5878ae92e655 |
1.2.0 of Kompose!
What's new in 1.2.0?
--volumes
has been added as a new CLI parameterThanks to all who've contributed to this months release!
Linux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.2.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.2.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | 743cd6e841d558bae698735430304437e237464caadb3fe262e41fcbacbbc217 |
kompose-darwin-amd64.tar.gz | ae983cb1fb8f962b41c082a0d3ef165ef80f842e1296d83433713b2fc63826b3 |
kompose-linux-amd64 | 890e209ae591e73dfc60686ffd12acf32f268f89e577ec9ae2154b6e1ecbb47a |
kompose-linux-amd64.tar.gz | ee6b64e3bae4ea39c218e0c111a8f5c54214f5024340ac925c2f4d7a42b3728c |
kompose-linux-arm | 8c1a128b1ad2b3b741f87f7e692f7face8410bb34d5e558e773227bda993e6ee |
kompose-linux-arm.tar.gz | bcd5103d07c6a2a9cedb42072886db7fa4b4bb8124993542b5da1bc6221d5d27 |
kompose-windows-amd64.exe | c8f41630f1fde1dfdb4fd05ddbd9a8e35a8d2f675c0b8f88cfc428810f055ea8 |
kompose-windows-amd64.exe.tar.gz | 3fd13b68988a6a4e4fb712da0cfc6eca76789a03cc5313c23c08b1ea06c11b82 |
Our first release since 1.0.0 and a lot has happened.
So what's new in 1.1.0?
New keys:
group_add
will now be converted to it's Kubernetes equivalant within Docker Compose Version 2.global
parameter.In this example, both deploy keys and health check will be converted:
version: "3"
services:
redis-master:
image: gcr.io/google_containers/redis:e2e
ports:
- "6379"
redis-slave:
image: gcr.io/google_samples/gb-redisslave:v1
healthcheck:
test: ["CMD", "echo", "helloworld"]
interval: 1m30s
timeout: 10s
retries: 3
deploy:
replicas: 6
resources:
limits:
cpus: '0.001'
memory: 50M
reservations:
cpus: '0.0001'
memory: 20M
ports:
- "6379"
environment:
- GET_HOSTS_FROM=dns
frontend:
image: gcr.io/google-samples/gb-frontend:v4
ports:
- "80:80"
environment:
- GET_HOSTS_FROM=dns
labels:
kompose.service.type: LoadBalancer
For more information and what keys can now be converted, check out our conversion table for a full list.
Updates:
make test-k8s
Thanks again to all whom contributed to this months release!
Linux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.1.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.1.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | b80ac52ed227810f87c9ded82460a1261947668080219e920e1a627590a3eb20 |
kompose-darwin-amd64.tar.gz | 111ddc43db69a25b4faccb50663d7289618b3aaf703ed7a738a4e8c15ed41184 |
kompose-linux-amd64 | ebffbc3b3b5089d43a4a2fee14019fe0eca95ca78bf11b1b22b60670983c1fa4 |
kompose-linux-amd64.tar.gz | ddd96349d99cc88426cd970789cfeb110badd335a24e50989b802906cfac5cc3 |
kompose-linux-arm | d15e6c37f3df22b6842f9773d54afff65e1dfc7311ebf8a9da550f5f78cbbf94 |
kompose-linux-arm.tar.gz | 99a78eaeca818e4794b2254d56e463454a04247371e7ae20e772c90734a7a51c |
kompose-windows-amd64.exe | 9cf9dce5e7652aff96658dd112de67b63f3b09930c1f42dd55557139a2a621cb |
kompose-windows-amd64.exe.tar.gz | b21b2f69ad3d8418655cb542e48deb5728d3dd65c6c6f4cd135719290db165d5 |
Happy 1.0.0!
With the release of 1.0.0, we also graduate from the Kubernetes Incubator!. Our new repository is now at github.com/kubernetes/kompose.
Thank you everyone for using as well as contributing to Kompose in order to achieve this amazing milestone!
So what’s new with Kompose 1.0.0?
docker-compose.yaml
file, Kompose will automatically build and push the image to the respective Docker repository for Kubernetes to consume.Docker Compose Version 3:
Converting Version 3 Docker Compose files is now possible with Kompose. It’s as simple as running kompose up
against an example version 3 file.
$ head -1 docker-compose.yaml
version: "3"
$ kompose up
INFO 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 Deploying application in "default" namespace
INFO Successfully created Service: frontend
INFO Successfully created Service: redis-master
INFO Successfully created Service: redis-slave
INFO Successfully created Deployment: frontend
INFO Successfully created Deployment: redis-master
INFO Successfully created Deployment: redis-slave
Your application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods,pvc' for details.
Docker Push and Build Support:
Kompose supports both building and pushing Docker images. When using the build key within your Docker Compose file, your image will:
Using an example Docker Compose file:
version: "2"
services:
foo:
build: "./build"
image: docker.io/foo/bar
Using kompose up
with a build
key:
$ kompose up
INFO Build key detected. Attempting to build and push image 'docker.io/foo/bar'
INFO Building image 'docker.io/foo/bar' from directory 'build'
INFO Image 'docker.io/foo/bar' from directory 'build' built successfully
INFO Pushing image 'foo/bar:latest' to registry 'docker.io'
INFO Attempting authentication credentials 'https://index.docker.io/v1/
INFO Successfully pushed image 'foo/bar:latest' to registry 'docker.io'
INFO 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 Deploying application in "default" namespace
INFO Successfully created Service: foo
INFO Successfully created Deployment: foo
Your application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods,pvc' for details.
Linux and macOS:
# Linux
curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.0/kompose-linux-amd64 -o kompose
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.0.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.
Checksums:
Filename | SHA256 Hash |
---|---|
kompose-darwin-amd64 | f987bb6405203379fc9da5903e34a089cb125e14ed10195f25a635c471c0ef97 |
kompose-darwin-amd64.tar.gz | 54904caf505332e646e232e542a7b5360c278cf0dc8e7592ea76c682b481b77b |
kompose-linux-amd64 | ddcd239d497ed55d799f902f98e91ce8a3e89b226384cdc3f6c38f57b16f0582 |
kompose-linux-amd64.tar.gz | 9c53bb1f7da9edb7c6fc4a292d78db65ef4603d98b791bfd342a4a487bb43665 |
kompose-linux-arm | e98daef026758a91bcc491222335f8d03e1b2b33c40730b10f6b0ef5179720d7 |
kompose-linux-arm.tar.gz | 234810948a09e721501b164d56c5471d92d9c25c373f04a70d1dd803160b4938 |
kompose-windows-amd64.exe | f06c1156cbc427e83e08840fc352639086b142f02ded45c3381f5bc5dd5ee57d |
kompose-windows-amd64.exe.tar.gz | f9fcb3f8618e08afc0b717746e4d7fa173d56f86dcd8831e6f306fc3d14a9383 |
0.7.0 release of Kompose!
In this release we (generally) fix bugs, add more tests, as well as make documentation changes.
We've also added args
support to build
in Docker Compose.
version: "2"
services:
foobar:
build:
context: "./build"
args:
- NAME=web
- foo
Major changes:
A more detailed changelog can be found at CHANGELOG.md.
Many thanks for those who've contributed to this month's release!
Another release of Kompose! This time it's 0.6.0 and we've got a lot of changes.
We've added a new CLI parameter called --insecure-repository
. By passing a true
value, you can now build an OpenShift ImageStream object with an insecure repository.
kompose up --provider=openshift --insecure-repository true
You can also now specify what namespace you'd like to use with the new --namespace
CLI parameter,
kompose up --namespace foobar
New keys have been added! Special thanks to @gitlawr. Both cap_add
and cap_drop
will now be successfully converted to their Kubernetes/OpenShift equivalents.
New features:
kompose down
is used #536
cap_add
and cap_drop
key support #580
0.5.0 of Kompose!
In this release, we add new key support as well as fix numerous bugs.
We've added key support to specify a specific Dockerfile in the build process:
services:
foobar:
build:
context: "./build"
dockerfile: "Dockerfile-alternative"
We now delete objects (via kompose down
) based on label. Kompose will also keep-trying to delete objects when using kompose down
.
New features:
kompose down
Again, many thanks for those who have contributed to this release!