<p>In an environment with 100 pods each with it's own label 'env=&lt;>'. When I use the command "kubectl get pods --selector env=dev' it gives me 36 pods by listing them. However, I am interested in only the count i.e., 36 and do not want the pods to be listed. How do I accomplish this?</p>

Vinodh Nagarajaiah
<p>You can get rid of the header if you use</p>

<pre><code>kubectl get pods --selector env=dev --no-headers | wc -l
</code></pre>
