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 →
kubectl get pods -l app=dbto see which ordinal is blockingkubectl describe pod db-2for events- Check
updateStrategy(RollingUpdate vs OnDelete) andpartition - Fix the pod (probe, image, PVC) because the controller will not skip it
- 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.
More on Deployments and rollouts
You applied a new image tag and the rollout seems stuck at "1 out of 3 new replicas have been updated". What do you check first?BeginnerHow do you roll back a bad release and verify you are back on the previous version?BeginnerA rollout must never reduce capacity below current replicas. How do you configure the strategy?IntermediateYou need a blue/green deployment without a service mesh. How do you do it with plain Kubernetes?IntermediateHow would you do a canary release with only Deployments and a Service?IntermediateWhat is the difference between Recreate and RollingUpdate strategies and when would you pick Recreate?Beginner