Lesson 8 of 30
Compose runs containers on one machine. Production traffic doesn't fit on one machine forever — orchestration is the layer that decides which of many machines runs what, and what happens the instant one of them dies.
13 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A Compose file and a Kubernetes Deployment can both describe "run this image." What can the Kubernetes Deployment do that Compose fundamentally can't?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Compose (from earlier in this track) describes and runs a multi-container app — on one host. An orchestrator (Kubernetes, Amazon ECS, and others) solves a different, harder problem: given a fleet of machines and a set of containers that need to run, decide which machine runs which container, keep that assignment correct as machines and traffic change, and replace anything that dies — automatically, without a human running a command.
Four capabilities are what "orchestration" actually means in practice:
Compose runs containers on one host — no view of a wider fleet.
A Kubernetes Deployment declaring replicas: 5 for an image is doing conceptually the same job as a Compose services: entry — describing what should be running — but the scheduler deciding which of dozens of nodes actually run those 5 replicas, restarting any that fail, and load-balancing traffic across whichever are currently healthy, is work Compose never does at all. That's the actual line between "runs containers" and "orchestrates containers."
depends_on."What does Kubernetes actually do that Docker alone doesn't?" is a common conceptual-level question specifically because so many candidates have used docker run without ever needing to reason about multi-host scheduling — naming the four capabilities (scheduling, self-healing, scaling, service discovery) precisely is a stronger answer than "it manages containers," which doesn't actually say anything a plain docker run doesn't already do at a smaller scale.