Kubernetes Job
External
Internal
Overview
A Kubernetes Job is a workload resource that can be used to start and manage Pods to successful completion.
A Pod is considered completed, and thus its execution counted against the completion counter only if finishes successfully. This counter can be configured with .spec.completions
. When the specified number of successful completions is reached, the Job is complete. The Job will attempt to restart failed Pods, which don't count against successful executions. The number of retires until the attempts are dropped can be configured with .spec.backoffLimit
. More details on a Job's life cycle is available in the Job Lifecycle section.
The Pods managed by a Job will carry a job-name
labels with the name of the job, and also a controller-uid
label.
Pods can be executed in parallel. The Parallel Execution section provides more details on that.
If the Job needs to execute on a schedule, a CronJob is a better tool.