Pod exceeded its activeDeadlineSeconds limit
Production Risk
Batch jobs fail to complete; data processing pipelines are interrupted.
DeadlineExceeded means the pod's activeDeadlineSeconds limit was reached and Kubernetes forcibly terminated it. This field sets an absolute wall-clock deadline for the entire pod's running time and is commonly used on Job pods to enforce maximum run duration. When exceeded, the pod is terminated and the Job may mark the run as failed.
- 1Batch job or pod took longer than the configured activeDeadlineSeconds
- 2activeDeadlineSeconds set too low for the expected workload duration
- 3Infinite loop or hung process in a Job pod caused it to run past its deadline
Job pod terminated with DeadlineExceeded reason; Job shows failed status.
kubectl describe pod myjob-pod | grep -A 5 "Reason:" # Reason: DeadlineExceeded kubectl describe job myjob | grep -A 5 "Conditions:"
expected output
Reason: DeadlineExceeded Message: Pod was active on the node longer than the specified deadline
Fix 1
Increase or remove activeDeadlineSeconds
WHEN Legitimate job needs more time
# In Job spec
spec:
activeDeadlineSeconds: 3600 # 1 hour
template:
spec:
containers:
- name: myjob
image: myimage:tagWhy this works
Raises the wall-clock deadline to accommodate legitimate job duration.
Fix 2
Investigate and fix hung process
WHEN Job should complete well within the deadline but is hanging
kubectl logs myjob-pod --follow kubectl exec myjob-pod -- ps aux
Why this works
Identifies whether the job is making progress or stuck in an infinite loop.
Kubernetes Documentation
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev