Magic Command to Clear All Those Annoying Pods in Your OpenShift Cluster

openshift persistent volumes

Sometimes your PODs may get stuck in UNKNOWN, PENDING, TERMINATING etc. states. These PODs seem to have the durability to live forever and contaminate your compute nodes. When you try to delete them, sometimes the command line will say that the POD was successfully deleted while in fact, it was not.

Here I want to share with you a magic command that I use to delete multiple annoying PODs at once:

You can replace “unknown” by other states to clear stuck nodes in different states.

Hope this helps.

Good Luck,