Kubernetes Job or CronJob: Which One to Use and When?

Parallel Job Execution

Job type is more defined in case we need to run parallel jobs. A default job has .spec.completions and .spec.parallelismunset or defaults to 1. But if we need to run parallel jobs or even want a number of completions of tasks, this can be achieved only with Job type. Read more about parallel and completions from this doc.

CronJob can be unreliable

There is chance of non-execution and missing schedule if the startingDeadlineSeconds is set to lower than 10 sec and if more than 100 schedules are missed respectively.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store