<p>I have a cluster with 2 node groups: <em>real time</em> and <em>general</em>. I would like only pods which tolerate affinity <em>real time</em> to be able to run on nodes from the <em>real time</em> cluster.
My approach was to <em>taint</em> the relevant nodes and add <em>toleration</em> to the pod that I want to register to that node. I came into a dead-end when I was trying to taint a node-group. In my case I have an EKS node group that is elastic, i.e. nodes are increasing and decreasing in numbers constantly. How can I configure the group so that nodes from one group will be tainted upon creation?</p>

Guy Zarzar
<p>I assume you're creating your nodeGroup via CloudFormation?</p>

<p>If that is the case you can add <code>--kubelet-extra-args --register-with-taints={key}={value}:NoSchedule</code> as your ${BootstrapArguments} for your LaunchConfig</p>

<p><code>/etc/eks/bootstrap.sh ${clusterName} ${BootstrapArguments}</code></p>

<p>That way, whenever you scale up or down your cluster, a Node will be spawned with the appropriate taint.</p>
