Hello, It might be confusing for me or its interesting question.. While scheduli . . .

Basavraj Nilkanthe:
Hello, It might be confusing for me or its interesting question… While scheduling pod on specific node using nodeName: controlplane and I am able to create schedule pod on that node without issue even it has taint applied on it – Ideally it should not schedule pod on that node if taint applied on it ? – Also, if I schedule pod using nodeSelector it wont schedule… Does it mean this validation of verifying if specific node has taint applicable to scheduler who will be deciding on it?

root@controlplane:~# kubectl describe node controlplane | grep -i taint
Taints:             <http://node-role.kubernetes.io/master:NoSchedule|node-role.kubernetes.io/master:NoSchedule>

---
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: nginx
  name: nginx
spec:
  nodeName: controlplane
  containers:
  - image: nginx
    name: nginx
---
root@controlplane:~# kubectl get pods -o wide
NAME    READY   STATUS    RESTARTS   AGE     IP           NODE           NOMINATED NODE   READINESS GATES
nginx   1/1     Running   0          3m28s   10.244.0.6   controlplane   &lt;none&gt;           &lt;none&gt;

Gurudutt Dongre:
Only the scheduler takes taints (and other scheduling conditions) into considerations. Specifying the nodeName is the way to bypass the taints and directly schedule the pods on the nodes of our choice.

Basavraj Nilkanthe:
hmm, I was guessing this… Thanks mate for clarification

Phani M:
@Basavraj Nilkanthe ideally it is better to add a toleration to NoSchedule and also add a NodeSelector to guarantee the scheduling

Basavraj Nilkanthe:
@Phani M yes but question was related to nodeName if this bypass all condition like validating taint/toleration, nodeSelection

Basavraj Nilkanthe:
thats cleared now

Basavraj Nilkanthe:
nodeName bypass all validation what usually scheduler does