<p>Is there any resource out there that gives an overview of all the possible status conditions a kubernetes job can have?</p>

<p>I'm wondering because I would like to check, when I run a job if it is already running and if so, exit the new job.</p>

<p>I came across <code>until kubectl get jobs myjob -o jsonpath='{.status.conditions[?(@.type=="Complete")].status}' | grep True ; do sleep 1 ; done</code> quite a few times but I want to know if it is running, not if it is already complete. Would prefer not to wait (ha) for kubectl 1.11 wait functionality</p>

wesvb
<p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#jobcondition-v1-batch" rel="noreferrer">kubernetes API docs for JobCondition</a> imply that the only <code>type</code> values are “Complete” and “Failed”, and that they may have a <code>”True”</code> or <code>”False”</code> <code>status</code>.</p>
<p>In addition to the job status conditions array, you may also find it informative to look at the job status <code>active</code> count, and the <code>startTime</code> and <code>completionTime</code> if you’re just interested in whether it’s finished.</p>
