Interview Prep/Kubernetes/Reliability & Rollouts

What do you do about Pods stuck in Terminating?

IntermediateProductionReliability & Rollouts
Answer

Check finalizers, volume detach problems and a hung process or unreachable node. First kubectl describe and the node's state; fix the underlying cause. As a last resort force delete, understanding it only removes the API object, not necessarily the container.

kubectl delete pod web-0 --grace-period=0 --force

For StatefulSets, force deletion risks two Pods with the same identity if the node is merely partitioned.

All Kubernetes questions

More on Reliability & Rollouts