<p>The kubernetes master have the taint which will not schedlue the normal workloads on the master. But it schedules the pods on the master though it has the taint applied as noschedule.</p>

<p>How is this possible, is the k8s environment behaving differently or my understanding wrong. I expect, the master should allow the pods to be scheduled only after removing the taint on the master.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  -  image: nginx
     name: nginx
  nodeName: master
</code></pre>

<p>Snapshot of what I see in the lab environment.
<a href="https://i.stack.imgur.com/FM7uR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FM7uR.png" alt="enter image description here"></a></p>

<p>While <code>taint</code>s are meant to be a way for a Node to repel some Pods, when you explicitly provide <code>nodeName</code> in PodSpec, it takes precedence over the other methods for node selection (taints and tolerations, etc.) and Kubernetes scheduler actually short circuits the process of scheduling by directly assigning the Pod to that node.</p>

<p>However, as <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename" rel="nofollow noreferrer">docs</a> mentions, after assigning a Pod to a Node, it may fail to run because of resource limitations. But the scheduling job is done.</p>
