<p>How to list Batch-Job by label-selector. I want to list out the job with a certain label like:
<code>type: upgrade</code> or something else.
Looking out for label selector fields while querying job from client-go.</p>

Abhishek Kumar
<p>I was making mistake worrying about the <code>.Get()</code> method to find job by labelSelector, and thus working hard in the wrong direction.</p>
<p>Here is how you can list out all job with the label-selector<br />
To get job by label-selector, We have to use <code>.List()</code> method.</p>
<pre class="lang-golang prettyprint-override"><code>label := &quot;type=upgrade,name=jiva-upgrade&quot;; 
jobs, err := k.K8sCS.BatchV1().Jobs(namespace).List(context.TODO(), metav1.ListOptions{LabelSelector: label})
</code></pre>
