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 <none> <none>