Skip to content

Helpful Commands

To cordon a node:

kubectl drain $servername --ignore-daemonsets --delete-emptydir-data

To uncordon a node and place it back into service:

kubectl uncordon $servername

To kill a pod that is stuck in "Terminating" status:

kubectl delete pod <pod-name> -n <namespace> --grace-period=0 --force

If the force delete doesn't work, the pod almost certainly has a stuck finalizer. Check with:

kubectl get pod <pod-name> -n <namespace> -o jsonpath='{.metadata.finalizers}'

And clear it:

kubectl patch pod <pod-name> -n <namespace> -p '{"metadata":{"finalizers":null}}' --type=merge

Common finalizer culprits are CSI drivers and service mesh sidecars that never got the chance to clean up. If you're seeing this repeatedly on the same node rather than as a one-off, the node itself is usually the problem — systemctl status kubelet and the container runtime (containerd on RKE2) are where I'd look next.