Concept and Usage
A Job creates one or more pods and is considered complete when all the pods inside it complete successfully. When you delete a job, the pods created by the job are deleted too. Use cases:- Running a batch job
- Backup operations
Job YAML
job.yaml
completions— The job runs until this many pods complete successfully.parallelism— How many pods to run in parallel at a time.restartPolicy: Never— If a pod fails, it will not be restarted. Instead, a new pod is created to replace it.
If some pods fail, the job will create new pods to replace the failed ones until the specified number of
completions is achieved. The job keeps retrying until all pods have successfully completed or the job is deleted.