A backoff limit is a Job setting that limits how many times Kubernetes tries to run the Job before considering it failed. The count includes container crashes and node failures. section 10.2.1
Use the setting alongside the Job’s restart policy:
- backoffLimit belongs to the Job and counts failed execution attempts. section 10.2.1
- restartPolicy belongs to the embedded PodSpec and controls whether the kubelet restarts failed containers; Jobs support OnFailure or Never. section 10.2.1
Allow two retries
Set spec.backoffLimit to 2 in a batch/v1 Job. A Job that crashes twice and is then evicted during node maintenance has three counted failures. section 10.2.1
