What problem does container orchestration solve that plain Docker does not?
Quick Answer
Running one container is easy; running hundreds across many machines — with scheduling, self-healing, rollouts, service discovery, scaling, and config/secret distribution — is what orchestration automates. Kubernetes turns 'a box of containers' into a declarative, self-managing system.
Detailed Answer
docker run starts a container on one host. Production needs answers to: which node has room for this workload (scheduling), what happens when a container or a whole node dies (self-healing), how do I roll out a new version without downtime and roll back if it breaks (deployments), how do other services find this one when its IP changes every restart (service discovery + load balancing), how do I add capacity under load (horizontal scaling), and how do I ship configuration and secrets without baking them into images. Orchestrators like Kubernetes provide all of this through a declarative model: you describe the desired state in YAML, and controllers continuously reconcile the actual state toward it. That reconciliation loop is the core idea — you don't script the steps, you declare the goal and the system keeps it true.
Code Example
# Declarative desired state — K8s keeps 3 replicas running forever
apiVersion: apps/v1
kind: Deployment
metadata: { name: web }
spec:
replicas: 3
selector: { matchLabels: { app: web } }
template:
metadata: { labels: { app: web } }
spec:
containers: [{ name: web, image: nginx:1.27 }]Interview Tip
The phrase interviewers want to hear is 'declarative desired state reconciled by controllers.' Contrast it with imperative scripting to show you understand *why* K8s is designed the way it is.