Last active
June 8, 2018 07:44
-
-
Save canhnt/4a5beced742d24b69c8e1c9743ae4111 to your computer and use it in GitHub Desktop.
Delete all evicted pods
This file contains hidden or 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 pod --all-namespaces | grep Evicted | grep 10d | awk '{print $1" " $2}' | xargs -n2 sh -c 'kubectl delete pod $2 -n $1' sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment