Kubernetes Job Pods Become In "Unknown" State Kubernetes Job Pods Become In "Unknown" State kubernetes kubernetes

Kubernetes Job Pods Become In "Unknown" State


The actual state of the Job is Terminated with the Unknown reason. In order to debug this situation you need to get a relevant logs from Pods created by your Job.

When a Job completes, no more Pods are created, but the Pods arenot deleted either. Keeping them around allows you to still view thelogs of completed pods to check for errors, warnings, or otherdiagnostic output.

To do so, execute kubectl describe job $JOB to see the Pods' names under the Events section and than execute kubectl logs $POD.

If that won't be enough, you can try different ways to Debug Pods, such as:

  • Debugging with container exec

  • Debugging with an ephemeral debug container, or

  • Debugging via a shell on the node

The methods above will give you more info retarding the actual reasons behind the Job termination.