Skip to content

Instantly share code, notes, and snippets.

@marfenij
Forked from ipedrazas/gist:9c622404fb41f2343a0db85b3821275d
Last active February 28, 2022 10:11
Show Gist options
  • Save marfenij/cdb54105c6cc6ed1d93536571a216dd7 to your computer and use it in GitHub Desktop.
Save marfenij/cdb54105c6cc6ed1d93536571a216dd7 to your computer and use it in GitHub Desktop.
Delete evicted pods
kubectl get po --all-namespaces | grep Evicted | awk '{print $2, "--namespace", $1}' | xargs kubectl delete pod
@duyetpt
Copy link

duyetpt commented Mar 23, 2021

A small modify work for me:

kubectl get pods --all-namespaces | grep Evicted | awk '{print $2, "--namespace", $1}' | xargs kubectl delete pod

@marfenij
Copy link
Author

yeah, it's work also

p.s prev. version was the same )

@marfenij
Copy link
Author

option '--show-all' removed in 1.14 kubernetes/kubernetes#67895 (comment)
so now it's default behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment