Skip to content

Instantly share code, notes, and snippets.

@sbiham
Last active June 7, 2022 20:10
job_name="your-job-name"
cronjob_name="your-cronjob-name"
kubectl create job --from=cronjob/$cronjob_name --dry-run=client -o yaml $job_name
| yq eval ".spec.template.spec.containers[0].command += \"<YOUR EXECUTION COMMAND>"\" -
| yq eval ".spec.template.spec.containers[0].image = \"<DOCKER PATH>"\" -
| kubectl apply -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment