Live data from Hacker News

Show HN: Go from Docker-Compose to Kubernetes with a simple tool

kompose.io

41–47 of 47 posts

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#41
post #5
post #2

Hoping this helps with the Kubernetes learning curve. We've just started migrating and keeping track of the terminology has been tough.

Is there a reason to go from docker-compose to kubernetes?

The typical use case is when a dev team uses docker compose while the ops team has chosen docker+kube. It creates an impedance mismatch which complicates the dev/ops handoff.

Since it's typically hard for the ops team to convince the dev team to abandon compose, the next best thing for is to translate formats each time the dev team wants to deploy. That is what kompose allows.

Note that Docker has a similar translator built-in, so ops teams can deploy compose to production directly without needing an external tool. But it doesn't support kubernetes, so it doesn't help ops teams who have adopted kube.

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#42
post #14

I used this to get an idea how K8s looked when I wanted to migrate ~500 lines of docker compose YAML config to k8s. The result was sufficiently confusing that we threw it away, but it was helpful to get an idea what we were looking at, and why. We rebuilt the stack from hand, using all the files from the kompose tool as a guide/reference. Later we found that kubectl can dump yaml, I found `kubectl .... -o=yaml[ ...]`…

You can also add the `--export` flag to get kubectl to omit unique metadata that would be ignored on import; keeps your exported files a bit tidier.

Export needs more work.

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#43
post #35

Earlier quoted context omitted.

Quick correction, Docker 17.03 supports compose files out of the box, in swarm mode. Two commands to deploy and scale. https://docs.docker.com/engine/reference/commandline/stack_d...

This. GP comment was downvoted into oblivion, but he had a point. Compose (at least, v3/v3.1) is a reasonably simple system, that can describe a fairly complex setup. Kubernetes has a lot of complexity to it. And the question "why do I need it, if there are simpler options?" is left unanswered.

Until you end up working around various shortcomings and then suddenly your yaml files are a mess and almost a framework in themselves.

The Kubernetes files really arent that complex

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#44

While I appreciate the effort, as a Kubernetes user I can't really recommend this tool. As a migration tool, it might save some time building your YAML files, but the differences between Compose and Kubernetes are large enough (secret management, for example) that the mapping will be incomplete. But more importantly, the tool itself doesn't lead to a great understanding of Kubernetes itself. In my opinion, the better…

Some people learn better by putting everything together from the ground up.

Some people learn better by starting with a working example and going from there.

I suspect you and I are both in the first group, but for the second group, this seems like a nice way to get started.

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#45
post #44

While I appreciate the effort, as a Kubernetes user I can't really recommend this tool. As a migration tool, it might save some time building your YAML files, but the differences between Compose and Kubernetes are large enough (secret management, for example) that the mapping will be incomplete. But more importantly, the tool itself doesn't lead to a great understanding of Kubernetes itself. In my opinion, the better…

Some people learn better by putting everything together from the ground up. Some people learn better by starting with a working example and going from there. I suspect you and I are both in the first group, but for the second group, this seems like a nice way to get started.

Of course. I personally prefer learning by copying from examples rather than reasoning through reference documentation. But that doesn't mean you need a tool to generate examples. All you need is a small list of "this is how Docker Compose declares X, this is how K8s does it". Compose's surface area is much smaller than K8s, so it doesn't require a lot of examples.

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#46
post #14

Earlier quoted context omitted.

You can also add the `--export` flag to get kubectl to omit unique metadata that would be ignored on import; keeps your exported files a bit tidier.

Export needs more work.

Go on?

Re: Show HN: Go from Docker-Compose to Kubernetes with a simple tool

#47
post #33

Earlier quoted context omitted.

Started using minikube and kompose just yesterday. They're really nice tools. I'm stuck on the fact that minikube doesn't seem to use my vpn connection (fail when attempting to link to library dependencies over vpn).

That sounds annoying. Could it be something with the configuration in your virtualization tool?

Could be, I'm using xhyve, but haven't messesd with any configuration myself.
Post reply on HN