Removing Evicted / Error pods on Kubernetes


 

Sometime there was hung pods on our cluster and never remove.

to check pods status:
kubectl get pods -A --field-selector=status.phase=Failed

Use this command to remove all evicted pods on every namespace:

kubectl delete pods -A --field-selector=status.phase=Failed

Comments