Created
September 18, 2021 03:16
-
-
Save arischow/2a536ab271bd9cb4e30e5fd4a057b254 to your computer and use it in GitHub Desktop.
[Evicted Pods] Source: https://stackoverflow.com/a/62640917/4003204 #Kubernetes
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 -A pods --no-headers --field-selector status.phase=Failed | awk '{system("kubectl -n " $1 " delete pod " $2 )}' |
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 -A pods --no-headers --field-selector=status.phase=Failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment