Created
October 31, 2020 20:12
-
-
Save ezhuravlev/c1c30b60db2a7a577b8df98033b22671 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Deleting all jobs (in parallel - it can trash CPU)" | |
kubectl get jobs --all-namespaces | sed '1d' | awk '{ print $2, "--namespace", $1 }' | while read line; do | |
echo "Running with: ${line}" | |
kubectl delete jobs ${line} & | |
sleep 0.05 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment