Docker Compose vs Kubernetes for Small Projects
Docker Compose vs Kubernetes in 2026: what Compose actually gives you now, the real cost of a cluster you run yourself, and the four signals that mean you have outgrown one box.
Compose and Kubernetes solve different problems, and almost everyone asking this question has the first problem. This is what Compose actually does in 2026, what a cluster costs you in money and hours, and the four signals that mean you have genuinely outgrown a single box. (If you searched for “docker compose vs k8s”: k8s is Kubernetes, and the answer does not change with the abbreviation.) Verified 2026-10-19, prices re-read 2026-11-06.
The honest summary
For a project that fits on one to three servers, Docker Compose is the right answer. Kubernetes accelerates organisations that have outgrown single machines — it does not make small projects easier, cheaper or more reliable.
| Capability | Docker Compose | Kubernetes |
|---|---|---|
| Single host | Native | Overkill |
| Restart a failed container | restart: unless-stopped |
Native |
| Reschedule onto another node when a host dies | Manual | Native |
| Rolling deploys with zero downtime | Manual (proxy + two services) | Native |
| Autoscaling | No | HPA / KEDA |
| Configuration surface | One YAML file | Manifests, CNI, CSI, ingress, RBAC |
| Time to first deploy | Minutes | Days to weeks |
| Ongoing maintenance | Near zero | Upgrades, etcd backups, certificate rotation |
| Floor cost | The VPS | The VPS plus reserved cluster overhead |
What Compose actually gives you in 2026
Compose is not a toy, and the features people ask Kubernetes for are mostly there:
- Healthchecks and dependency order:
depends_onwithcondition: service_healthywaits for the database to accept connections, not just for the container to exist. - Restart policy:
restart: unless-stoppedcovers the crash loop that Kubernetes’ restart behaviour covers. - Profiles:
docker compose --profile debug upstarts optional services only when you ask. docker compose watch: rebuilds or syncs on file change during development, which removes the “rebuild the image to test a one-line change” loop.- Resource limits:
deploy.resources.limitsis honoured by the Compose v2 runtime, so one runaway service cannot eat the host.
A working production file looks like this:
services:
app:
image: ghcr.io/you/app:1.4.2 # pinned tag, never :latest
restart: unless-stopped
env_file: .env
depends_on:
db:
condition: service_healthy
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/health"]
interval: 30s
timeout: 3s
retries: 3
db:
image: postgres:17-alpine
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set it in .env}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
retries: 5
volumes:
pgdata:
That file, plus a reverse proxy that terminates TLS (Caddy, Traefik or nginx), plus a backup job, is the platform for a SaaS with a few thousand users. Nothing in it needs a scheduler.
What a self-managed cluster actually costs
This is the part that never appears in comparisons, and it has two lines: reserved memory and your hours.
Memory. A control plane (API server, etcd, controller manager, scheduler) plus kubelet, the container runtime and a CNI plugin on every node. On small nodes that is roughly 1-2 GB of RAM before your first container starts — on a 4 GB VPS, that is half the box.
Money. With reference prices from the provider’s own price page on 2026-10-19:
| Setup | Monthly | What you get |
|---|---|---|
| Compose on one VPS | $4.54 | OVHcloud VPS-1: 2 vCores, 4 GB RAM, 40 GB NVMe, daily backup, unmetered traffic |
| Compose + reverse proxy, more headroom | $8.50 | OVHcloud VPS-2: 4 vCores, 8 GB RAM, 75 GB NVMe |
| k3s on three small VPS | $13.62+ | Three nodes at $4.54, of which a large share of RAM is cluster overhead |
| Managed control plane | varies by provider | You pay per cluster-hour and still run the nodes |
Managed Kubernetes control planes are billed per cluster-hour and the rate changes; read the current number on your provider’s pricing page before budgeting it. The point of the table is not the managed figure — it is that a three-node cluster you run yourself costs three times the compute and gives you a failure domain you did not have before.
Hours. Node upgrades, etcd snapshots, CNI upgrades, certificate rotation, and the first outage caused by a LimitRange nobody read. That is the real invoice, and it is paid in evenings.
The four signals that you have outgrown one box
Migrate when one of these is true, not before:
- A host failure is an incident you cannot absorb. Not “it would be annoying” — an SLA you have signed, or money lost per hour of downtime.
- Several teams need to deploy independently to shared infrastructure without coordinating release windows.
- Node-level autoscaling is a business requirement: traffic that spikes 10x with no schedule and no way to pre-provision.
- You have someone who owns the platform. A cluster without an owner becomes a pet that nobody upgrades.
None of these are “we want to be ready for scale”. Migrating from Compose to Kubernetes later is a well-understood project; the reverse migration, from a cluster you did not need back to a single file, is a week of archaeology.
The genuine middle ground
- Coolify / Dokploy: Compose with a UI, TLS, backups and one-click restores. The sweet spot for a small SaaS: you keep the single-file mental model and gain a control panel.
- k3s: a real Kubernetes API in a single binary, useful for learning and for edge boxes. It does not remove the scheduling concepts, it just makes them lighter.
- Docker Swarm: multi-host scheduling with far less complexity, but effectively stagnant for years. Legacy option, not a strategy.
- Nomad: simpler than Kubernetes and genuinely good, with a smaller ecosystem and hiring pool.
Rolling deploys without a scheduler
The one thing people miss from Kubernetes on a single host is the zero-downtime deploy. You can have it with Compose and a proxy:
# scale the app service to two containers, let the proxy health-check them
docker compose up -d --no-deps --scale app=2 app
# once the new container's healthcheck passes, scale back to one
docker compose up -d --no-deps --scale app=1 app
Or let the proxy do it: Caddy with two upstreams and active health checks drains the old container when its /health endpoint starts failing. That is a load balancer doing what a load balancer does — it never needed a control plane.
Our recommendation
Our recommendation for a project starting today
Docker Compose on a single VPS, with a reverse proxy for TLS and an off-host backup from day one. Add Coolify or Dokploy when the UI or the restores become the bottleneck. Reconsider Kubernetes only when one of the four signals above is actually true — and when you have the person who will own it.
Common problems
- “Kubernetes will fix my deploys.” Deploys on Compose are two commands. If they feel slow, the problem is your tests or your missing CI, not the orchestrator.
- The control-plane RAM tax. A three-node cluster can spend more memory on itself than your application uses.
- Cert-manager rabbit holes. A single Caddyfile does the same job for one host.
- Volumes and state. Stateful workloads on Kubernetes are the hardest part of Kubernetes. On Compose they are a named volume and a
pg_dump— genuinely simpler, not just simpler to start. - Backups nobody tests. Neither tool backs anything up. A restore you have never performed is not a backup.
FAQ
Can Docker Compose handle production traffic? Yes. Compose is a process supervisor with a declarative file: it starts containers, restarts failed ones, wires networks and volumes. What it does not do is reschedule your workload onto another machine when a host dies. For a single-server product that difference does not exist, because there is no other machine.
How much RAM does Kubernetes itself use? A self-managed cluster costs memory before it runs any of your code: kube-apiserver, etcd, controller-manager and scheduler on the control plane, plus kubelet, the container runtime and a CNI plugin on every node. Plan for roughly 1-2 GB reserved for system components on small nodes, which is money not spent on your database.
Is Docker Swarm a valid middle ground? It solves multi-host scheduling with a fraction of Kubernetes’ complexity, but it has seen little development for years. Treat it as a legacy option: if you need multi-host today, k3s or a managed platform is the safer bet.
When should I migrate from Compose to Kubernetes? When a single host failure is a real incident you cannot absorb, when several teams need to deploy independently to shared infrastructure, or when node-level autoscaling is a business requirement. Not when you want to be ready for scale.
Related guides
FAQ
Can Docker Compose handle production traffic?
Yes. Compose is a process supervisor with a declarative file: it starts containers, restarts failed ones, wires networks and volumes. What it does not do is reschedule your workload onto another machine when a host dies. For a single-server product that difference does not exist, because there is no other machine.
How much RAM does Kubernetes itself use?
A self-managed cluster costs memory before it runs any of your code: kube-apiserver, etcd, controller-manager and scheduler on the control plane, plus kubelet, the container runtime and a CNI plugin on every node. Plan for roughly 1-2 GB reserved for system components on small nodes, which is money not spent on your database.
Is Docker Swarm a valid middle ground?
It solves multi-host scheduling with a fraction of Kubernetes' complexity, but it has seen little development for years. Treat it as a legacy option: if you need multi-host today, k3s or a managed platform is the safer bet.
When should I migrate from Compose to Kubernetes?
When a single host failure is a real incident you cannot absorb, when several teams need to deploy independently to shared infrastructure, or when node-level autoscaling is a business requirement. Not when you want to be ready for scale.