Sometimes pods get stuck in the Terminating state due to node issues, kubelet problems, or blocking finalizers.
This guide shows how to force delete them both individually and across all namespaces.
microk8s kubectl delete pod <pod-name> -n <namespace> --grace-period=0 --force --wait=falseExample:
microk8s kubectl delete pod example-pod-57664595bd-whwcn -n example-pod-demo --grace-period=0 --force --wait=falsemicrok8s kubectl get pods --all-namespaces | grep Terminating | awk '{print $2" -n "$1}' | xargs -r -L1 microk8s kubectl delete pod --grace-period=0 --force --wait=falseIf you want to see which pods would be deleted without actually deleting them:
microk8s kubectl get pods --all-namespaces | grep Terminating--grace-period=0tells Kubernetes not to wait before killing the pod.--forcebypasses the normal pod lifecycle checks.--wait=falsemakes the command return immediately.
✅ With these commands, you can quickly clean up pods stuck in Terminating across your cluster.