Index du journalDockup / note de terrain
Note / kubernetes-vs-docker

Kubernetes vs Docker: What You Are Really Choosing

Kubernetes and Docker are not alternatives — one runs containers, the other schedules them across machines. Here is the question you actually meant to ask.

Kubernetes and Docker are not competitors, and comparing them is a little like comparing an engine with a fleet manager. Docker builds a container and runs it on one machine. Kubernetes takes containers other tools built and decides which of your machines each one runs on, restarting them when they die. You can use both, either, or neither.

The question almost everybody means when they type this is a different one: do I need an orchestrator at all? For most applications the answer is no, and the cost of getting that answer wrong is measured in months.

Docker builds an image and runs it as a container on one machine. Kubernetes takes images built to the same standard and schedules them across a cluster, moving a container elsewhere when its machine fails.

What Docker actually does

Docker does two jobs that are worth separating. It builds an image — a filesystem with your application and its dependencies frozen into it, described by a Dockerfile. And it runs that image as a container on a single machine, with its own filesystem view, its own network interface, and limits on what it can consume.

That is the whole scope. Docker has no opinion about what happens when the machine dies, no way to spread ten copies of your API across three servers, and no built-in answer to a rolling upgrade. It was never trying to have one.

The image format is the part that outlived the argument. An image built by Docker runs under containerd, Podman, Kubernetes and every managed platform in this category, because the format is an open standard rather than a Docker feature. This is also why "Kubernetes deprecated Docker" caused so much confusion in 2020: Kubernetes stopped using Docker as its runtime and kept running the images Docker builds. Nothing about anyone's Dockerfile changed.

What Kubernetes actually does

Kubernetes is a scheduler with an opinion. You give it a cluster of machines and a description of what should be true — three replicas of this image, this much memory each, this one reachable at that hostname — and it works continuously to make reality match the description. A machine dies, and the containers that were on it reappear elsewhere. A container fails its health check, and it is replaced.

That is genuinely valuable, and it is not free. A Kubernetes cluster is itself a system that needs upgrading, monitoring, securing and understanding. The vocabulary alone — pods, deployments, services, ingresses, config maps, persistent volume claims, namespaces — is a week before anything you wrote gets deployed. The rule of thumb that survives contact with reality: Kubernetes turns an operations problem into a different operations problem, and it is worth it only when the first problem is bigger than the second.

So which one do I need?

Neither, most likely. Here is the honest decision, in the order it actually gets made.

You need Docker if you want your application to run the same way on your laptop and in production. That is nearly everyone, and it is why a Dockerfile has become a normal thing for an application to have. Even then you may not write one — most platforms detect a Node, Python, Go or Ruby project and build a sensible image without being asked.

You need an orchestrator when one machine genuinely stops being enough: several services that must find each other, traffic that outgrows a single box, or an availability requirement that survives losing a machine. That threshold arrives later than people expect. A single container with two gigabytes of memory serves a very large number of applications, and a managed platform restarts it when it dies without anyone learning what a pod is.

You need Kubernetes specifically when you have outgrown managed platforms — unusual networking, strict data residency, a workload that must run identically in several clouds, or a team large enough that a platform team is a real job. If you cannot name which of those applies to you, that is the answer.

Kubernetes vs Docker, line by line

DockerKubernetes
What it isA tool that builds and runs containersA system that schedules containers across machines
ScopeOne machineA cluster of machines
Handles a machine dyingNoYes
Rolling deploys and rollbacksNoYes
Learning curveAn afternoonWeeks, and it keeps going
Who operates itYou, on one boxYou, plus the cluster itself
Needed by a typical web appUsuallyRarely
Cost floorThe one machineThe cluster, plus its control plane

The row that decides it is the second from the bottom. Everything Kubernetes does is real and useful; the question is whether your application has the problems those features solve.

What most teams do instead

There is a middle option that the framing of this question hides, and it is where most applications belong: a managed platform that runs your container for you. You keep the Dockerfile, or skip it and let the platform detect the project. The platform handles restarts, health checks, TLS, rolling deploys and the machine underneath. You do not run a cluster, because you do not have one.

That is what Dockup is. It runs containers — not Kubernetes — alongside managed PostgreSQL, MySQL, MongoDB and Redis, persistent volumes, and Linux and Windows virtual machines for the cases where a container is the wrong shape. Compute is metered per vCPU-hour rather than sold as a cluster, so a small service costs like a small service. If you later genuinely need Kubernetes, the Dockerfile comes with you: that is the point of a standard image format.

The comparison worth making is therefore not Kubernetes against Docker but managed platform against self-managed cluster — and that one turns on how much operations work you want to own.

Questions this gets asked

Is Kubernetes better than Docker? The question has no answer, because they do different jobs. Kubernetes runs containers built to the standard image format Docker popularised. A fair comparison is Kubernetes against another orchestrator, or Docker against another build-and-run tool such as Podman.

Did Kubernetes remove support for Docker? Kubernetes removed Docker as its container runtime in version 1.24, replacing it with containerd. Images built with Docker still run unchanged, because the image format is an open standard. For anyone deploying applications rather than operating clusters, nothing changed.

Do I need Kubernetes for microservices? No. Several services can run as several containers on a managed platform that gives each a private hostname and restarts it when it fails. Kubernetes becomes worth it when the number of services and machines is large enough that scheduling them by hand is the bottleneck.

Can I use Docker without Kubernetes in production? Yes, and most production applications do. A container on a managed platform is a normal production deployment. What you give up is control over scheduling, which most applications never needed.

Which is cheaper? A single container, by a wide margin. A Kubernetes cluster carries a control plane, worker nodes sized for the peak, and the engineering time to operate it. The comparison is rarely close until the workload is large enough that the cluster's efficiency begins to pay for itself.

When should I actually move to Kubernetes? When you can name the specific thing your platform will not do — a networking requirement, a residency rule, a multi-cloud obligation — rather than when the application simply grows. Growth alone is handled by larger containers and more of them.