Skip to content

Instantly share code, notes, and snippets.

@arischow
Created September 18, 2021 03:16
Show Gist options
  • Save arischow/2a536ab271bd9cb4e30e5fd4a057b254 to your computer and use it in GitHub Desktop.
Save arischow/2a536ab271bd9cb4e30e5fd4a057b254 to your computer and use it in GitHub Desktop.
[Evicted Pods] Source: https://stackoverflow.com/a/62640917/4003204 #Kubernetes
kubectl get -A pods --no-headers --field-selector status.phase=Failed | awk '{system("kubectl -n " $1 " delete pod " $2 )}'
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