A Pod stuck in Terminating for minutes or hours usually means Kubernetes is waiting on one of three things: a container ignoring SIGTERM, an unreachable worker node, or a lingering finalizer that never cleared.
30-Second kubectl Diagnosis
# 1. Inspect finalizers and deletionTimestamp
kubectl get pod -n -o jsonpath='{.metadata.finalizers}{"n"}'
# 2. Check if the Pod's node is NotReady or unreachable
kubectl get pod -n -o wide
kubectl get nodes
How to Unstick the Pod (Safe First, Force Last)
Check
terminationGracePeriodSeconds& PID 1 Signal Handling: If your container runs via a shell wrapper that swallowsSIGTERM, Kubernetes waits the full grace period before sendingSIGKILL(Exit Code 137). Use exec-formENTRYPOINT ["app"].Clear Stuck Finalizers (Only After Confirming Cleanup): If a controller or webhook deleted itself while leaving a finalizer behind, patch it out:
kubectl patch pod -n -p '{"metadata":{"finalizers":null}}' --type=merge
-
Force Delete (Last Resort for Dead Nodes): Only use
--force --grace-period=0when you are certain the underlying container is no longer running (especially for StatefulSets with PVCs, to avoid split-brain writes):
kubectl delete pod -n --grace-period=0 --force
Related guides: Investigate Exit Code 137 (SIGKILL) and Kubernetes QoS & Eviction Priority.
Originally published at OpsHubs. Found it useful? Buy us a coffee ☕.
Top comments (0)