Behavioural Senior Level

When would you use Docker Compose versus Docker Swarm versus Kubernetes? How do you decide which orchestration level a project needs?

Quick Tip

Match complexity to need: "Compose for single-server deployments — most startups live here longer than they think. Swarm when I need multi-node with minimal ceremony. Kubernetes when I need auto-scaling, complex networking policies, or the team already has the expertise."

What good answers include

Docker Compose: single-host development and simple production deployments. No clustering, no auto-scaling, but minimal complexity. Docker Swarm: built-in orchestration for multi-node clusters. Simpler than Kubernetes, good for small teams who need basic service scaling, rolling updates, and load balancing without the Kubernetes learning curve. Kubernetes: full-featured orchestration for large-scale deployments. Auto-scaling, self-healing, service mesh, RBAC, and a massive ecosystem — but significant operational complexity. Decision factors: team size, number of services, scaling requirements, uptime SLAs, and existing expertise. Strong candidates explain: most applications do not need Kubernetes, Compose is production-viable for many workloads behind a reverse proxy, and the operational cost of Kubernetes often exceeds the benefit for small teams.

What interviewers are looking for

Tests architectural judgement. Candidates who default to Kubernetes for every project are over-engineering. Those who never consider orchestration beyond Compose may struggle at scale. Look for the ability to assess project needs and match the tool to the complexity budget.

← All Docker questions