<p>My namespace has some custom metadata labels. Some have the labels some don't. Is there any way to get the namespaces which has a particular label using kubectl?</p>

<p>Yes. Like so:</p>

<pre><code>$ kubectl create ns nswithlabels

$ kubectl label namespace nswithlabels this=thing

$ kubectl describe ns/nswithlabels
Name:         nswithlabels
Labels:       this=thing
Annotations:  &lt;none&gt;
Status:       Active

No resource quota.

No resource limits.

$ kubectl get ns -l=this
NAME           STATUS    AGE
nswithlabels   Active    6m
</code></pre>

<p>Note: I could have also used <code>-l=this=thing</code> in the last command to specify both key and value required to match.</p>
