<p>To untaint my nodes, my scripts use ...</p>

<pre><code># kubectl taint nodes --all node-role.kubernetes.io/master-
</code></pre>

<p>but I want to deliberately taint my node to test this untaint functionality. I tried this variant and it works fine ...</p>

<pre><code># kubectl taint nodes foo foo=DoNotSchedulePods:NoExecute 
# kubectl taint nodes foo foo:NoExecute-   
node/foo untainted
</code></pre>

<p><strong>but</strong> I can't see how to set up so I can test the specific taint that I need to get rid of. I tried e.g.</p>

<pre><code># kubectl taint nodes foo foo=node-role.kubernetes.io/master     
error: unknown taint spec: foo=node-role.kubernetes.io/master  
</code></pre>

<p>How to put it into situation where I can test the aforementioned untainted command? </p>

k1eran
<p>To untaint the node:</p>

<pre><code> kubectl taint node &lt;Node Name&gt; node-role.kubernetes.io/master-
</code></pre>

<p>To taint the node:</p>

<pre><code> kubectl taint node &lt;Node Name&gt; node-role.kubernetes.io/master=:NoSchedule
</code></pre>
