Skip to content

Instantly share code, notes, and snippets.

@microwaves
Created July 29, 2019 07:21
Show Gist options
  • Save microwaves/253aca21ad17d73f3eb06b820a151982 to your computer and use it in GitHub Desktop.
Save microwaves/253aca21ad17d73f3eb06b820a151982 to your computer and use it in GitHub Desktop.
#You can simulate a rerun by replacing the job with itself:
kubectl get job "your-job" -o json | kubectl replace --force -f -
#If you get errors due to auto-generated labels or selectors, you can delete or edit them with jq:
kubectl get job "your-job" -o json | jq 'del(.spec.selector)' | jq 'del(.spec.template.metadata.labels)' | kubectl replace --force -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment