I have a cronjob with cronjob.spec.jobTemplate.spec.template.spec.restartPolicy=Never. And I am using kubectl create job --from=cronjob/my_cronjob my_test for manually starting an instance outside the schedule.

What I am observing is that subsequent instances of the resulting pod start after the first one has resulted in an error. The jobs job.spec.template.spec.restartPolicy and the pods' pod.spec.restartPolicy are also Never (as expected), so what could bring these restarts about?

1 Answer 1


So both cronjob.spec.jobTemplate.spec.template.spec.restartPolicy and cronjob.spec.jobTemplate.spec.backoffLimit influence such restarts. Setting the 2nd one to 0 (and keeping the 1st one at Never) brought about the desired behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.