Created
May 21, 2019 15:54
-
-
Save microwaves/28a63f25b53be80edd2d9a82caaadc14 to your computer and use it in GitHub Desktop.
Delete Evicted Pods in K8S
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get pods -a --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete pods \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment