<p>I have one node pool named &quot;<strong>application pool</strong>&quot; which contains node vm size of <strong>Standard_D2a_v4</strong>. This node pool is set to &quot;<strong>Autoscaling</strong>&quot;.
Is there in solution, where I taint the whole node pool in azure? to restrict the pods to schedule on that node pool?</p>

Kaivalya Dambalkar
<p>Taints can be setup with the <code>[--node-taints]</code> flag only when you are adding a node pool with <a href="https://learn.microsoft.com/en-us/cli/azure/ext/aks-preview/aks/nodepool?view=azure-cli-latest#ext_aks_preview_az_aks_nodepool_add" rel="nofollow noreferrer">az aks nodepool add</a> command:</p>
<blockquote>
<p>Add a node pool to the managed Kubernetes cluster.</p>
</blockquote>
<pre><code>az aks nodepool add --cluster-name
                    --name
                    --resource-group
                    [--node-taints]
</code></pre>
<p>However, you <a href="https://learn.microsoft.com/en-us/cli/azure/ext/aks-preview/aks/nodepool?view=azure-cli-latest" rel="nofollow noreferrer">cannot add taints to already existing node pool</a>:</p>
<blockquote>
<p>You can't change the node taints through CLI after the node pool is
created.</p>
</blockquote>
<p>A very similar topic is being discussed in <a href="https://github.com/Azure/AKS/issues/1402" rel="nofollow noreferrer">this open thread</a>.</p>
<p>So currently it is not possible to set taints to an existing node pool on AKS. But you can set them up while adding a new node pool to the managed cluster.</p>
