Jobs
A Job is a supervisor in Kubernetes that can be used to manage Pods that are supposed to run a determined task and then terminate gracefully. A Job creates the specified number of Pods and ensures that they successfully complete their workloads or tasks. When a Job is created, it creates and tracks the Pods that were specified in its configuration. When a specified number of Pods complete successfully, the Job is considered complete. If a Pod fails because of underlying node failures, the Job will create a new Pod to replace it. This also means that the application or code running on the Pod should be capable of gracefully handling a case where a new Pod comes up during the runtime of the process.
The Pods created by a Job aren't deleted following completion of the job. The Pods run to completion and stay in the cluster with a Completed
status.
A Job can be used in several different ways:
- The simplest use case is to create a Job that runs only one Pod to completion...