[deleted by user]

Archived post. New comments cannot be posted and votes cannot be cast.

Unless you are also considering to be able to deploy your apps on non kubernetes environment, I don't see the value in making docker compose AND k8s deployment scripts which you will have to troubleshoot both environment (k8s and standalone container env)

Exactly this.

docker-compose is the end of the line for that development approach. A docker image is a one line primary object for kubernetes.

Today, unless I was playing with a personal toy project and knew nothing about kubernetes, I have no idea why anyone would start with docker-compose in the first place.

More replies

Docker Compose is purely a developer tool, not a deployment tool. Avoid it entirely if possible.

If you want a closer experience without even using a mini Kubernetes, Podman can actually run Kubernetes YAMLs with podman play kube https://docs.podman.io/en/v4.2/markdown/podman-play-kube.1.html

It can also export them.

Docker Compose is purely a developer tool, not a deployment tool. Avoid it entirely if possible.

it's perfectly fine for a single machine deployment.

More replies

I mean compose can be fine for small prod deployments to VMs and the like.

More replies

Different people like different things. Try and see what you prefer. None of both options are wrong in this case :)

Docker compose is much easier to write and understand, usually on dev team you share the compose file.

If you’re working by yourself and already know Kubernetes you can skip compose if that’s what you prefer.

If Kubernetes is your end goal consider then one of these tools as a replacement for Docker Compose

Notes:

  • My personal recommendation is Devspace.

  • The reason you need to switch is because Compose does not talk to the Kubernetes API. It was designed to work in concert with Docker Swarm.

  • It is a pity that Kubernetes doesn't offer a single alternative. This is because the project has always focused on providing a container runtime. Building and deploying container images is left to other tooling.

Compose has more in common with a makefile than kubernetes. It's an abstraction layer over docker cli commands.