CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

Troubleshooting Failed Jobs

A Job that gives up, read from the object rather than guessed at - and the one field that decides whether every attempt leaves evidence behind or only the last one does.

Troubleshooting Guide 85 of 103 Intermediate

The job-name label is batch.kubernetes.io/job-name on current releases; older clusters use the unprefixed job-name.

Four nodes. Every attempt here is a short-lived Pod, so scheduling is not the subject.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

This guide includes

Use this when a Job has given up. This matters because a Job stops on purpose after backoffLimit attempts, and with restartPolicy: Never every attempt leaves a differently named Pod - so collecting the logs needs a selector rather than a name.

Before you start

  1. A Job that cannot succeed

  2. Why it stopped

  3. Getting the logs when every attempt has its own Pod

  4. The same failure with OnFailure

Official sources