<p>I have set an On-Prem Kubernetes cluster using Rancher, with 3 Centos nodes and 1 Windows node.
I wanted to set a Deployment that will never run over the Windows node, so I set in the Deployment spec.template.spec.nodeSelector: kubernetes.io/os: linux</p>
<p>It seems to run but the deployment gets stuck in Pending, with this error:</p>
<blockquote>
<p>Warning  FailedScheduling    default-scheduler  0/4 nodes are
available: 1 node(s) didn't match node selector, 3 node(s) had taint
{cattle.io/os: linux}, that the pod didn't tolerate.</p>
</blockquote>
<p>Any insights?</p>

tal47
<p>The scheduler is not able to schedule the pod on linux nodes because those nodes have got taints. So you need to add <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" rel="nofollow noreferrer">tolerations</a> in the pod spec of the deployment.</p>
<pre><code>  tolerations:
  - key: &quot;cattle.io/os&quot;
    operator: &quot;Equal&quot;
    value: &quot;linux&quot;
    effect: &quot;NoSchedule&quot;
</code></pre>
<p>Also add a specific taint to the windows nodes so that only specific pods with specific tolerations can only be scheduled onto the windows nodes</p>
<pre><code>kubectl taint nodes windowsnode cattle.io/os=windows:NoSchedule
</code></pre>
