Skip to content

Instantly share code, notes, and snippets.

@albertlieyingadrian
Created August 4, 2018 12:08
Show Gist options
  • Save albertlieyingadrian/6d23974c7da2f22490907f2e9c055c6b to your computer and use it in GitHub Desktop.
Save albertlieyingadrian/6d23974c7da2f22490907f2e9c055c6b to your computer and use it in GitHub Desktop.
Remove all pods in kubernetes cluster
kubectl get pods --all-namespaces -o json | jq -r '.items[] | select(.metadata.name | contains("your_pods_tag"))' > pods.json && kubectl delete -f pods.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment