Skip to content

Instantly share code, notes, and snippets.

@vkmc
Created October 7, 2020 12:06
Show Gist options
  • Save vkmc/4165268075c85db1dea82e344362ff9c to your computer and use it in GitHub Desktop.
Save vkmc/4165268075c85db1dea82e344362ff9c to your computer and use it in GitHub Desktop.
# delete evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs -n 2 -d '\n' bash -c 'kubectl delete pod $0 $1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment