←back to thread

1101 points codesmash | 1 comments | | HN request time: 0s | source
Show context
mrighele ◴[] No.45137889[source]
> If your Docker Compose workflow is overly complex, just convert it to Kubernetes YAML. We all use Kubernetes these days, so why even bother about this?

I find that kubernetes yaml are a lot more complex than docker compose. And while I do, no, not everybody uses kubernetes.

replies(3): >>45138013 #>>45138269 #>>45143229 #
esseph ◴[] No.45138013[source]
Having an LLM function as a translation layer from docker compose to k8s yaml works really well.

On another note, podman can generate k8s yaml for you, which is a nice touch and easy way to transition.

replies(4): >>45138153 #>>45138487 #>>45143983 #>>45146146 #
IHLayman ◴[] No.45138487[source]
You don’t need an LLM for this. Use `kubectl` to create a simple pod/service/deployment/ingress/etc, run `kubectl get -o yaml > foo.yaml` to bring it back to your machine in yaml format, then edit the `foo.yaml` file in your favorite editor, adding the things you need for your service, and removing the things you don’t, or things that are automatically generated.

As others have said, depending on an LLM for this is a disaster because you don’t engage your brain with the manifest, so you aren’t immediately or at least subconsciously aware of what is in that manifest, for good or for ill. This is how bad manifest configurations can drift into codebases and are persisted with cargo-cult coding.

[edit: edit]

replies(2): >>45139257 #>>45139426 #
esseph ◴[] No.45139426[source]
> You don't need an LLM for this

I guess that depends on how many you need to do

BTW, I'm talking about docker/compose files. kubectl doesn't have a conversion there. When converting from podman, it's super simple.

Docker would be wise to release their own similar tool.

compose syntax isn't that complex, nor would it take advtange of many k8s features out of the box, but it's a good start for a small team looking to start to transition platforms

(Have been running k8s clusters for 5+ years)

replies(1): >>45144060 #
pvtmert ◴[] No.45144060[source]
Why would docker should create such tool in the first place? It's the job of the target/destination to provide compatibility layer. In this case, Kubernetes already does with kompose.io tool.

kompose: https://kubernetes.io/docs/tasks/configure-pod-container/tra...

Also, technically docker-compose was the first orchestration tool compared to Kubernetes. Expecting former to provide a translation layer for the latter is rather unorthodox. It is usually the latter tool provides certain compatibility features for former tools...

replies(1): >>45144810 #
esseph ◴[] No.45144810[source]
Why would docker?

Because it's not very useful by itself for running production infra, but it's great for helping to develop it.

Otherwise you're going to see more and more move to podman (and podman desktop) / OCI containers over time, as corps won't have to pay the docker tax and will get better integration with their existing k8s platform.

replies(1): >>45149976 #
1. pvtmert ◴[] No.45149976[source]
Docker is useful and running in production. (well, it was the only, before containerd got separated entirely and it was usable directly from K8s about when it was 1.16)

What you say is absolutely correct. If Docker keeps creating compatibility layers for it's competitors, it makes everyone to switch to a competitor. In this case, the competitor is Kubernetes as it's running in production for much larger scale (enterprise workloads) compared to Podman et. al.

Hence, it's the job of Podman, Kubernetes, et. al. to write their compatibility layer to provide a value-add for their customers.