Last active
April 16, 2020 03:40
-
-
Save liangway/d59fa92c32aa9b927c348e140099915b 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 | |
for j in $(kubectl get jobs -o custom-columns=:.metadata.name) | |
do | |
if [[ $j == YOUR-JOB-PREFIX* ]] ; #Change the job prefix to delete other jobs | |
then | |
echo Delete job $j | |
kubectl delete jobs $j & | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment