While working on Kubernetes environment you may see hanging PODs after termination. You will see the state of Terminating
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 0/1 Terminating 0 1d
This can hold your work for sometime. In these cases you need to find the root cause of this issue but in the mean time if you want to quickly get rid of those pods, run following command -
$ kubectl delete pod <pod-name> -n <namespace> --grace-period=0 --force
Top comments (0)