Agent Kubernetes Jobs Backoff and Completion
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR Kubernetes Job evidence tells agents whether a batch task is still retrying, has reached its completion target, failed because of backoff policy, or was already cleaned up. ## Core Explanation Jobs are not long-running services. They create Pods for finite work and track successful completions. That makes their failure signals different from Deployments: the useful context is not only the latest Pod log, but also retry count, completion target, parallelism, indexed completion state, terminal conditions, and cleanup policy. Agents should inspect the Job spec, controller owner, generated Pods, completion conditions, `backoffLimit`, `completionMode`, `parallelism`, `completions`, `activeDeadlineSeconds`, `ttlSecondsAfterFinished`, pod events, container exit codes, and logs before changing the task command or rerunning the workload. ## Source-Mapped Facts - Kubernetes documentation says Jobs represent one-off tasks that run to completion and then stop. ([source](https://kubernetes.io/docs/concepts/workloads/controllers/job/)) - Kubernetes documentation says a Job creates one or more Pods and retries execution until a specified number of Pods successfully terminate. ([source](https://kubernetes.io/docs/concepts/workloads/controllers/job/)) - Kubernetes API reference says backoffLimit specifies the number of retries before marking a Job failed. ([source](https://kubernetes.io/docs/reference/kubernetes-api/batch/job-v1/)) - Kubernetes TTL-after-finished documentation says finished Jobs can be cleaned up automatically with .spec.ttlSecondsAfterFinished. ([source](https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/)) ## Further Reading - [Kubernetes Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/job/) - [Kubernetes Job v1 API Reference](https://kubernetes.io/docs/reference/kubernetes-api/batch/job-v1/) - [Kubernetes TTL-after-finished Controller](https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/)