Will I get concurrent runs of my CronJob in Kubernetes due to the documented limitations

1/13/2020

According to this page in K8S, "...two jobs might be created...".

If I set my concurrencyPolicy to "Forbid" - Will I still get optionally concurrent runs due to the scheduler, or will I get concurrent calls to run but be prevented?

I also opened an issue in the Docs site: https://github.com/kubernetes/website/issues/18655

-- Shachar Silbert
cron
k8s-cronjobber
kubernetes
kubernetes-cronjob

1 Answer

1/13/2020

Setting concurrencyPolicy to "Forbid" will make it so that if, by the time the next scheduled job comes around, the previous job is still running cron will not spin up another job and will count as a missed job. Setting it to "Allow" will allow these jobs to run at least once when scheduled.

There is only a chance of two jobs, or no job, being run at one scheduled time as K8S does not fully prevent this.

-- Nicholas Elkaim
Source: StackOverflow