Stuck in Terminating
A deleted pod shows Terminating until the kubelet confirms its containers have stopped and every finalizer is removed. Stuck means one of those isn’t happening.
Diagnose in order
Section titled “Diagnose in order”- Does it have finalizers?
kubectl get pod <pod> -o jsonpath='{.metadata.finalizers}'. A finalizer means some controller must act before deletion completes. - Is its node healthy?
kubectl get pod <pod> -o wide, thenkubectl get node <node>. If the node isNotReadyor gone, no kubelet can confirm the shutdown. - Is the app just slow to stop? Check
terminationGracePeriodSecondsand anypreStophook. A 300-second grace period looks stuck for five minutes.
Usual causes
Section titled “Usual causes”| Cause | Sign |
|---|---|
| Node unreachable | Node NotReady or deleted |
| Finalizer whose controller is gone | metadata.finalizers not empty, controller uninstalled or failing |
Long grace period or a preStop hook that hangs |
Pod on a healthy node, stops eventually |
| Volume can’t be unmounted | Kubelet logs show unmount errors |
For an unreachable node, decide whether the node is really dead before acting. Force deletion (kubectl delete pod <pod> --grace-period=0 --force) only removes the API object; if the node is actually alive, the old container may still be running.
That’s dangerous for StatefulSets, because a replacement with the same identity can start while the old one still writes to the same volume. For StatefulSets, confirm the node is powered off or fenced first.
For an orphaned finalizer, fix or reinstall the controller that owns it. Removing the finalizer by hand (kubectl patch pod <pod> -p '{"metadata":{"finalizers":null}}') skips whatever cleanup it was protecting.