I am new to kubernetes and I was thinking that how cordon works, how it makes the node unschedulable. Does it uses the concept of taints and toleration with the effect of NoExecute, and if not then how cordon is different from taints and tolerations.
Cordon adds a taint node.kubernetes.io/unschedulable:NoSchedule
to the node and more importantly updates the node object's nodes.spec.unschedulable
boolean field to true
.
So cordon is not just taints. Whatever you achieve by cordon i.e making the node completely not schedulable is not achievable only by taints.