Interview Prep/Kubernetes/Deployments and rollouts

A StatefulSet update does not progress. Pod `db-2` is stuck and `db-1` and `db-0` are old. What is going on?

IntermediateScenarioDeployments and rollouts
Answer

Situation read → StatefulSets update in reverse ordinal order and wait for each pod to be Running and Ready.

What I'd do →

  1. kubectl get pods -l app=db to see which ordinal is blocking
  2. kubectl describe pod db-2 for events
  3. Check updateStrategy (RollingUpdate vs OnDelete) and partition
  4. Fix the pod (probe, image, PVC) because the controller will not skip it
  5. If the pod is broken by the new template, revert the template and delete the stuck pod

Why → With the default OrderedReady policy, a StatefulSet halts when one pod is not Ready to protect quorum-based systems.

Interview tip → Mention partition for staged canary updates of StatefulSets.

All Kubernetes questions Roadmap: Kubernetes core

More on Deployments and rollouts