How to fix Job not found in Kubernetes

KubernetesINTERMEDIATEMEDIUMUpdated Dec 6, 2025ยท 130 views

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.

Quick fix

Fixes Job not found

kubectl get jobs
kubectl get jobs --all-namespaces
kubectl get jobs --all-namespaces | grep <job-name>
  1. List all jobs to verify existence
  2. Verify the correct namespace
  3. Check job history and TTL settings
  4. Look for orphaned pods from deleted job
kubernetes โ€” error
kubectl get jobs
kubectl get jobs --all-namespaces
kubectl get jobs --all-namespaces | grep <job-name>
Job not found

What this error means

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.

Typical symptoms

  • kubectl get job returns "not found" error
  • Job disappears after successful completion
  • CronJob cannot find previously created Job objects
  • Job references show dangling references in events
  • Application cannot retrieve Job status or logs
  • Pod events indicate Job deletion due to TTL
  • Job history is empty or missing expected entries

Common causes

  1. Job explicitly deleted with kubectl delete
  2. TTL (ttlSecondsAfterFinished) expired for completed Job
  3. Parent CronJob deleted, triggering cascade deletion
  4. Successful jobs cleaned up by successfulJobsHistoryLimit
  5. Failed garbage collection or etcd corruption
  6. Job ownership changed, affecting deletion behavior
  7. Race condition between completion and status check

How to fix "Job not found"

1List all jobs to verify existence

Check if the job exists in your current namespace:

bash
kubectl get jobs
kubectl get jobs --all-namespaces
kubectl get jobs --all-namespaces | grep <job-name>
2Verify the correct namespace

If the job exists but kubectl can't find it, check namespace:

bash
kubectl config view --minify --output='jsonpath={..namespace}'
kubectl config set-context --current --namespace=<namespace>
kubectl get job <job-name> -n <namespace>
3Check job history and TTL settings

View completed jobs that may have been garbage collected:

bash
kubectl get jobs --show-kind --all-namespaces
kubectl get job <job-name> -o yaml | grep -A2 ttlSecondsAfterFinished
4Look for orphaned pods from deleted job

If the job was deleted, its pods may still exist:

bash
kubectl get pods --all-namespaces -l job-name=<job-name>
kubectl delete pods -l job-name=<job-name>
5Recreate the job if needed

If the job needs to be rerun:

bash
kubectl apply -f job.yaml
6Adjust TTL settings

If jobs are disappearing too quickly, increase TTL:

yaml
spec:
  ttlSecondsAfterFinished: 3600  # Keep for 1 hour
7Check CronJob if job originated from one

If created by CronJob:

bash
kubectl get cronjobs
kubectl describe cronjob <cronjob-name>
kubectl get jobs -l cron-job=<cronjob-name>

Advanced notes

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.

Frequently asked questions

What does "Job not found" mean?
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.
How do I fix "Job not found"?
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.
What causes "Job not found"?
Job explicitly deleted with kubectl delete TTL (ttlSecondsAfterFinished) expired for completed Job Parent CronJob deleted, triggering cascade deletion
Is the "Job not found" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading