Interview Prep/Kubernetes/Configuration, Secrets and storage

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 →

  1. The node controller marks the pod for deletion but the kubelet cannot confirm termination
  2. StatefulSets guarantee at-most-one pod with that identity, so they will not start the replacement until the old one is gone
  3. Check the volume attachment with kubectl get volumeattachment
  4. If the node is confirmed dead, kubectl delete pod --force --grace-period=0 or use the out-of-service taint node.kubernetes.io/out-of-service=nodeshutdown:NoExecute
  5. 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.

All Kubernetes questions Roadmap: Kubernetes core

More on Configuration, Secrets and storage