A Pod is stuck in `Terminating` for 30 minutes after `kubectl delete pod`.
IntermediateTroubleshootingResources, OOM, probes and termination
Answer
Likely causes → (1) The node is down or the kubelet is unreachable, so nobody confirms the containers stopped. (2) A finalizer in metadata.finalizers that a controller never removes. (3) A volume that cannot be unmounted.
Diagnose →
kubectl get pod web-x -o jsonpath='{.metadata.finalizers}{"\n"}{.spec.nodeName}{"\n"}'
kubectl get node $(kubectl get pod web-x -o jsonpath='{.spec.nodeName}')
kubectl describe pod web-x | sed -n '/Events/,$p'
Fix → Node dead: delete or recover the Node object; the Pod is then garbage collected. Stale finalizer: fix the owning controller, or as a last resort remove it:
kubectl patch pod web-x -p '{"metadata":{"finalizers":null}}' --type=merge
kubectl delete pod web-x --grace-period=0 --force only removes the API object; the container may still run on the node.
Prevent → Monitor node health and controllers that own finalizers; avoid force deletes for StatefulSets.
More on Resources, OOM, probes and termination
`kubectl describe pod` shows `Last State: Terminated, Reason: OOMKilled, Exit Code: 137`.BeginnerA Java service is OOMKilled at 2 GiB limit but the heap is only `-Xmx1800m`.IntermediateMany Pods on one node were killed at once and the node shows a `SystemOOM` event. Container limits were not reached.AdvancedPods show `Evicted` with `The node was low on resource: memory. Threshold quantity: 100Mi, available: 87Mi. Container app was using 1.4Gi, request is 256Mi`.IntermediateA Pod is evicted with `Pod ephemeral local storage usage exceeds the total limit of containers 1Gi`.Intermediatep99 latency spikes every few seconds, CPU usage graph shows only 40% of the limit.Advanced