Member-only story
Introduction
CronJob in Kubernetes is good for handling Deployment like Cron, but it is difficult to understand because there are many API fields. So I would like to organized it, next, show how it works.
CronJobSpec API fields
All information about API fields we can find in link below:
The concurrencyPolicy
is a little difficult to understand, so I added it.
Example:
If a job takes 2 minutes to execute, but cron is set to be executed every minute, jobs will occur at the same time.
⚠️ Allow is an option that allows it, Forbid prohibits it, and Replace gives priority to new jobs.
The StartingDeadlineSeconds
is also difficult to understand, so supplement it.
Example:
Suppose a job is delayed or executed for some reason. At that time, you can roughly set how many seconds will you wait. If this is 0, it won’t happen again, and if it’s 30, it will wait for 30 seconds. If execution is not started within the allowable time, it is considered as a failed job.