Skip to main content
Self-Hosting & Privacy

Docker Compose vs Kubernetes: When to Move

The real decision framework for outgrowing Docker Compose: numeric container and node thresholds, the K3s middle step most guides skip, and what migrating actually costs — grounded in a single-host homelab.

Milan BuhaOctober 2, 20268 min read
ShareXin
Docker Compose vs Kubernetes: When to Move

You just added the fifth or sixth service to your docker-compose.yml, someone on a forum told you "that's not how you do it in production," and now you're staring at a Kubernetes tutorial wondering if your homelab is somehow doing it wrong. It isn't. One team runs 500,000 logs a day on plain Docker Compose; another migrated to Kubernetes, felt the pain, and moved back — saving 60 hours a month. The real question isn't "which tool is more professional." It's whether the operational cost of not having Kubernetes has actually started to outweigh the cost of running it.

TL;DR

  • Docker Compose runs one host well. It has no built-in way to schedule across machines, no cross-node self-healing, and weak secrets handling — but most homelabs never hit those limits.
  • The real graduation signals are numeric: roughly 20–30 containers on one box, needing 2+ hosts scheduled as one system, or wanting uptime guarantees nobody's manually restarting for you.
  • K3s — a single binary under 100 MB — is the middle step almost every comparison article skips, and it's where most homelabbers should land before (or instead of) full Kubernetes.
  • Migrating isn't a find-and-replace: Compose files don't translate 1:1 to Kubernetes manifests, and you inherit new failure modes (CrashLoopBackOff, unbound PVCs) along with the new features.
  • My own homelab is still 100% Compose, and the checklist below is the actual trigger list I'm watching for before that changes.

What Docker Compose Actually Gives You

Docker Compose talks to a single Docker daemon and reads one YAML file that defines every service, network, and volume your stack needs. Run docker compose up -d and it's running — no control plane, no cluster to bootstrap, nothing else to learn first. That simplicity is the entire feature, not a limitation to apologize for.

It's also genuinely capable further than the stereotype suggests. As covered in our Docker Compose for self-hosting guide, restart policies, health checks, and named volumes cover most of what a single-host homelab or small production service actually needs day to day.

Note

Compose can still restart a crashed container automatically (restart: unless-stopped) — what it can't do is notice that the whole host died and reschedule that container somewhere else. That distinction is the whole comparison in one sentence.

What Kubernetes Actually Adds

Kubernetes schedules containers across a fleet of machines instead of one. If a node dies, it reschedules the affected pods onto a healthy node automatically — self-healing at the machine level, not just the container level. It also gives you rolling updates with real health gates, native secrets management, and horizontal autoscaling triggered by actual load.

None of that is free. You're now running (and patching) a control plane, learning a much larger API surface, and maintaining YAML that tends to sprawl across many small files instead of one readable Compose block.

Docker Compose Kubernetes
Orchestration scope Single host Multiple nodes as one cluster
Self-healing Restarts a crashed container on the same host Reschedules onto a different healthy node
Rolling updates Manual, or scripted around up -d Native, with configurable health checks
Secrets management .env files / Docker secrets (basic) Native Secrets API, external-vault integrations
Autoscaling None Horizontal Pod Autoscaler
Learning curve Minutes Days to weeks for real proficiency
Resource overhead Near zero A control plane, even on a single node

The Real Graduation Signals (Not a Feature List)

Every comparison article stops at that table. It's true and it's also useless for deciding anything, because it never tells you when those features start mattering to your actual setup. Here's the checklist I actually use:

Signal Docker Compose is still fine Time to consider Kubernetes / K3s
Container count, one host Under ~20–30 Consistently past that on a single box
Host / node count 1 2+, and you're SSHing between them to deploy
Uptime requirement Personal project, "restart it when I notice" Someone else genuinely depends on it staying up
Team size Solo or one other person A dedicated ops function, even part-time
Deploy frequency across hosts Rare, manual is fine Frequent enough that manual coordination is error-prone

Some real-world write-ups put the "you actually need this" line even higher: 10+ services that truly need independent scaling, 500K+ daily active users, and a dedicated two-engineer ops team before Kubernetes' overhead pays for itself in a business context. A homelab will almost never reach that bar — but the shape of the decision (node count and who's on call) is identical at any scale.

Warning

The single most common mistake is migrating for resume-building reasons alone. Kubernetes on one node adds control-plane overhead and a steeper failure-mode learning curve with none of the multi-node benefits that justify it. If you have one box, Compose (or K3s in single-node mode, below) is the better choice regardless of what a job posting says.

The Middle Step Most Guides Skip: K3s

Almost every Compose-vs-Kubernetes article frames this as a binary choice. In practice, most homelabbers who outgrow Compose don't jump to full upstream Kubernetes — they go to K3s, a CNCF-certified Kubernetes distribution that ships as a single binary under 100 MB and runs comfortably on a 1 GB RAM node, with SQLite standing in for etcd on small clusters.

K3s gives you real Kubernetes APIs — the same kubectl commands, the same manifests, transferable skills — without standing up a full multi-node etcd cluster first. You can start K3s on a single node (genuinely comparable to running Compose) and add nodes later without re-architecting anything. Community write-ups from homelabbers who've made the move consistently land on K3s, not stock Kubernetes, as the practical entry point — and it's worth comparing K3s against Docker Swarm too, since Swarm is a lighter — if less actively developed — third option for multi-host Compose-style deployments.

Tip

If you're graduating mainly to learn Kubernetes rather than to solve a real multi-node problem today, start K3s on a single spare machine (even a Raspberry Pi) before you touch your production stack. You get the real APIs with none of the migration risk.

My Own Homelab: Why I'm Still on Compose

My Proxmox box runs a dozen or so containerized services — Jellyfin, a couple of *arr apps, Tailscale, a reverse proxy — all through Compose files organized the way I describe in the Docker Compose self-hosting guide. That's comfortably under the ~20–30 container line above, on one host, with nobody but me depending on uptime.

KEY-STAT: 12 — containers currently running on my homelab's single Docker Compose stack, well under the ~20–30 line where Compose starts getting unwieldy

The trigger that would actually move me isn't a feature I'm missing — it's adding a second physical box for redundancy. The moment I have two machines I want treated as one system, docker compose up on each of them separately stops being a shortcut and starts being a liability, and that's when K3s goes on the list. Until then, migrating would trade a system I understand completely for one I'd be learning under pressure, which is a bad trade for a homelab with no one paging me at 2 a.m.

What Migrating Actually Costs You

Compose files don't translate one-to-one into Kubernetes manifests. A docker-compose.yml service becomes a Deployment, a Service, and often a ConfigMap or Secret — more files, more indirection, and networking assumptions that don't carry over cleanly (Compose's automatic service-name DNS isn't identical to Kubernetes' Service discovery). Ingress replaces whatever reverse-proxy setup you had, as covered from the VM/container-choice side in our Docker vs. virtual machines comparison.

You also inherit new failure modes that don't exist in Compose at all — a pod stuck in CrashLoopBackOff, a PersistentVolumeClaim that never binds, a Service with no matching Endpoints. None of these are hard once you've seen them, but the first time each one happens, budget an evening, not fifteen minutes. If you're still deciding between containers and full VMs for a given service in the first place, our Proxmox vs. Docker breakdown covers that earlier fork in the decision tree.

Frequently asked questions

Is Kubernetes overkill for a homelab?

For a single host, yes, almost always. Kubernetes' core value is scheduling and self-healing across multiple machines — on one node you pay the control-plane overhead with none of the multi-node payoff. K3s in single-node mode is a reasonable exception if you're deliberately learning the APIs.

Can Docker Compose run in production?

Yes. Teams have run Compose in production handling tens of thousands of users and hundreds of thousands of log lines a day. It's a legitimate production choice for single-host workloads, not just a local-dev tool.

What is the difference between Docker Compose and Kubernetes?

Compose orchestrates containers on one Docker host from a single YAML file. Kubernetes orchestrates containers across a cluster of machines, adding cross-node self-healing, native secrets, rolling updates with health gates, and autoscaling — at the cost of a control plane and a much larger learning curve.

Should I learn Kubernetes or Docker Compose first?

Compose first. It teaches the core container concepts (images, networks, volumes) with almost no ceremony. Kubernetes' extra concepts — pods, services, deployments, ingress — make far more sense once you already understand what Compose is doing underneath them.

What is K3s and how is it different from Kubernetes?

K3s is a CNCF-certified, lightweight Kubernetes distribution: the same APIs and manifests as upstream Kubernetes, packaged into a single binary under 100 MB with SQLite replacing etcd for small clusters. It's built specifically for edge, IoT, and homelab-scale hardware.

How many containers can Docker Compose handle?

There's no hard cap, but the practical ceiling for one host is around 20–30 containers before management (and the host's own resources) start getting unwieldy — the number depends far more on what each container does than on Compose itself.

The Bottom Line

Compose isn't a stepping stone you're supposed to feel embarrassed about — it's the correct tool for one host, and it stays correct well past where most homelabs ever grow. Watch the actual signals (container count, node count, who depends on uptime) instead of a feature checklist, and if the day comes, land on K3s before assuming you need the full Kubernetes stack. It's the same APIs, a fraction of the overhead, and — per the Compose pillar guide and its down vs. stop vs. kill companion — a much smaller leap from where you already are than a straight jump to upstream Kubernetes would be.

Related stories

More from Self-Hosting & Privacy

Stay in the loop

Get the latest articles delivered to your inbox. No spam, unsubscribe anytime.

Read next

Proton Pass: Worth the Switch From Bitwarden?

I migrated a real vault from Bitwarden to Proton Pass: what imported cleanly, what broke, and whether the bundle price beats paying separately.

Continue Reading