Evicted pods are like houseguests who overstayed their welcome. Time to show them the door.

1
2
3
kubectl get pods --all-namespaces --field-selector=status.phase=Failed \
  -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{"\n"}{end}' | \
  while read ns pod; do kubectl delete pod -n $ns $pod; done

Or for a specific namespace:

1
kubectl delete pods --field-selector=status.phase=Failed -n <namespace>