A node is lost and a StatefulSet pod with an EBS volume does not reschedule for 6 minutes or more. Why?
AdvancedScenarioConfiguration, Secrets and storage
Answer
Situation read → Data pod is stuck Terminating on a NotReady node and the replacement pod waits.
What I'd do →
- The node controller marks the pod for deletion but the kubelet cannot confirm termination
- StatefulSets guarantee at-most-one pod with that identity, so they will not start the replacement until the old one is gone
- Check the volume attachment with
kubectl get volumeattachment - If the node is confirmed dead,
kubectl delete pod --force --grace-period=0or use the out-of-service taintnode.kubernetes.io/out-of-service=nodeshutdown:NoExecute - Fix node health detection and use shorter tolerations
Why → At-most-one semantics protect against two writers on the same data, so Kubernetes waits for proof the old one is dead.
Interview tip → Explain the out-of-service taint, it shows depth.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerHow do you manage secrets in GitOps without committing them in plain text?IntermediateA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?Beginner