<p>Using the below command labels can be added to a pod.</p>
<pre><code>kubectl label pod &lt;pod-name&gt; {key1=value1,key2=value2,key3=value3}
</code></pre>
<p>What is the best way to add or remove a label, say, [ env: dev ] from all pods running in a given namespace.</p>

P Ekambaram
<blockquote>
<p>...to add or remove a label, say, [ env: dev ] from all pods running
in a given namespace.</p>
</blockquote>
<p>Try:</p>
<p><code>kubectl label pods --namespace &lt;name&gt; --all env=dev</code>  # &lt;-- add</p>
<p><code>kubectl label pods --namespace &lt;name&gt; --all env-</code>  # &lt;-- remove</p>
