<p>So trying to figure how tainting in k8s will work , i have following setting at kubelet yaml spec, i am slightly confused what will be value at register-with-taints given that i want to only allow certain pod's to be placed on this node....rest all POD's should drop or or for any other pod then specific pod node should behave unschedulable.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>        --container-runtime=docker \
        --register-node=true \
        --allow-privileged=true \
        --register-schedulable=false \
        --register-with-taints=
        --pod-manifest-path=/etc/kubernetes/manifests \</code></pre>
</div>
</div>
</p>

Nik
<p>The <code>--register-with-taints</code> argument to <code>kubelet</code> is a node-level argument and registers the node with the given list of taints.</p>

<p><a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="noreferrer">Here</a> is the documentation about <code>--register-with-taints</code>:</p>

<pre><code>--register-with-taints []api.Taint
    Register the node with the given list of taints (comma separated "=:").
    No-op if register-node is false.
</code></pre>

<p>If <code>--register-with-taints</code> is set, it should be of the form <code>&lt;key&gt;=&lt;value&gt;:&lt;effect&gt;</code> (or comma separated like <code>&lt;key1&gt;=&lt;value1&gt;:&lt;effect1&gt;,&lt;key2&gt;=&lt;value2&gt;:&lt;effect2&gt;</code>).</p>

<blockquote>
  <p>i want to only allow certain pods to be placed on this node</p>
</blockquote>

<p>To do this:</p>

<ol>
<li>Pass something like <code>--register-with-taints=key=value:NoSchedule</code> to <code>kubelet</code>. This means that no pod will be able to schedule onto this node unless it has a matching toleration.</li>
<li><p>Now, to allow a certain pod to be placed on this node, specify a toleration matching the above taint for the pod in the PodSpec yaml. Both of the following tolerations "match" the above taint, and thus a pod with either toleration below would be able to schedule onto the node:</p>

<pre><code>tolerations:
- key: "key"
  operator: "Equal"
  value: "value"
  effect: "NoSchedule"

---- OR ----

tolerations:
- key: "key"
  operator: "Exists"
  effect: "NoSchedule"
</code></pre></li>
</ol>

<p>More information about taints and tolerations in Kubernetes is <a href="https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/" rel="noreferrer">here</a>.</p>
