Interview prompt
Explain deployments reconcile desired state to an engineer who understands the surrounding system but has not used this technique. Walk from its contract to a concrete operation, then discuss where it fails or becomes expensive.
A strong answer
Kubernetes controllers continuously compare observed cluster state with a declared desired state. A Deployment describes a target number and version of replicated Pods; its controller creates or replaces ReplicaSets and Pods to move the system toward that target.
When a container image changes, a Deployment can create a new ReplicaSet and gradually shift replicas according to rollout settings. Readiness probes influence whether a Pod is considered ready to receive traffic; liveness probes can trigger a restart when a process is unhealthy under the configured test.
A complete answer also calls out the assumptions that control correctness. A declarative manifest is a desired-state request, not proof the change succeeded. A rollout may stall because images cannot be pulled, capacity is unavailable, or readiness never passes. Probes should test the intended health contract; overly aggressive probes can restart healthy but slow-starting processes.
Close by describing one representative test or measurement. A Deployment requests six replicas but only four are ready. List the cluster and application signals you would inspect before increasing the replica count.
Follow-up questions
Answer the follow-ups in the frontmatter. Use the linked article for the concept and the trace to make the explanation concrete.