A Job that was previously running or scheduled has become unavailable. This occurs when Jobs are deleted, garbage collected due to TTL settings, or removed by parent resources. Resolve by checking Job history, TTL configuration, and cleanup policies.
This error occurs when kubectl or applications cannot locate an expected Kubernetes Job resource. Jobs can disappear through explicit deletion, TTL-based auto-cleanup, cascade deletion from parent CronJobs, or garbage collection. Understanding Job lifecycle and retention policies is essential for troubleshooting.
Check if the job exists in your current namespace:
kubectl get jobs
kubectl get jobs --all-namespaces
kubectl get jobs --all-namespaces | grep <job-name>If the job exists but kubectl can't find it, check namespace:
kubectl config view --minify --output='jsonpath={..namespace}'
kubectl config set-context --current --namespace=<namespace>
kubectl get job <job-name> -n <namespace>View completed jobs that may have been garbage collected:
kubectl get jobs --show-kind --all-namespaces
kubectl get job <job-name> -o yaml | grep -A2 ttlSecondsAfterFinishedIf the job was deleted, its pods may still exist:
kubectl get pods --all-namespaces -l job-name=<job-name>
kubectl delete pods -l job-name=<job-name>If the job needs to be rerun:
kubectl apply -f job.yamlIf jobs are disappearing too quickly, increase TTL:
spec:
ttlSecondsAfterFinished: 3600 # Keep for 1 hourIf created by CronJob:
kubectl get cronjobs
kubectl describe cronjob <cronjob-name>
kubectl get jobs -l cron-job=<cronjob-name>Jobs are immutable after creation. To make changes, delete and recreate the job. For long-running or important jobs, set ttlSecondsAfterFinished to a large value or null to disable automatic cleanup. When a Job is deleted, its child pods are typically deleted due to ownerRef garbage collection.
No subnets found for EKS cluster
How to fix "eks subnet not found" in Kubernetes
unable to compute replica count
How to fix "unable to compute replica count" in Kubernetes HPA
error: context not found
How to fix "error: context not found" in Kubernetes
default backend - 404
How to fix "default backend - 404" in Kubernetes Ingress
serviceaccount cannot list resource
How to fix "serviceaccount cannot list resource" in Kubernetes