Skip to content

Instantly share code, notes, and snippets.

@gadiener
Created June 21, 2019 12:06
Show Gist options
  • Save gadiener/49569ed04c78bbdbf5b2fc44f21fe93f to your computer and use it in GitHub Desktop.
Save gadiener/49569ed04c78bbdbf5b2fc44f21fe93f to your computer and use it in GitHub Desktop.
Delete evicted pods
#!/bin/sh
kubectl get po --all-namespaces | awk '{if ($4 ~ /Evicted/) system ("kubectl -n " $1 " delete pods " $2)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment