1

Quick question regarding Kubernetes job status.

Lets assume I submit my resource to 10 PODS and want to check if my JOB is completed successfully.

What is the best available options that we can use from KUBECTL commands.

I think of kubectl get jobs but the problem here is you have only two codes 0 & 1. 1 for completion 0 for failed or running, we cannot really depend on this

Other option is kubectl describe to check the PODS status like out of 10 PODS how many are commpleted/failed.

Any other effective way of monitoring the PODs? Please let me know

Ram
  • 149
  • 2
  • 5

2 Answers2

1

Anything that can talk to the Kubernetes API can query for Job object and look at the JobStatus field, which has info on which pods are running, completed, failed, or unavailable. kubectl is probably the easiest, as you mentioned, but you could write something more specialized using any client library if you wanted/needed to.

coderanger
  • 52,400
  • 4
  • 52
  • 75
0

I was able to able to achieve it by running the following, which will show the status of the container:

kubectl describe job
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Ram
  • 149
  • 2
  • 5