Master nodes are not cordoned by default
Is this a request for help?: No
Is this an ISSUE or FEATURE REQUEST? (choose one): ISSUE
What version of acs-engine?: v0.9.4
Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm) Kubernetes (v1.8.2)
What happened: After deploying a new cluster, master nodes were not cordoned by default, meaning any pod could be scheduled on master nodes.
What you expected to happen:
Master nodes should be cordoned by default, i.e. they should have SchedulingDisabled in status when doing kubectl get node
How to reproduce it (as minimally and precisely as possible):
Create a basic cluster using acs-engine v0.9.4 and check status in kubectl get nodes for master nodes.
Anything else we need to know:
This definitely used to work before (K8s version 1.7.2). The difference noticed in the Azure deployment JSON of older cluster is that it had "registerSchedulable": false, whereas the new cluster has "registerWithTaints": "node-role.kubernetes.io/master=true:NoSchedule" in master variables.
Ref: https://github.com/Azure/acs-engine/blob/master/parts/kubernetesmastervars.t#L195-L202
This is by design. See:
https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
The only pods that should be scheduleable on the master nodes (with "registerWithTaints": "node-role.kubernetes.io/master=true:NoSchedule" set) are pods that have a toleration for NoSchedule.
Are you seeing behavior that suggests the taint isn't working as designed?
Hi Jack, you are right, this the expected behaviour. Should've done more research before posting.
Just to confirm, we tested it by overloading the cluster with pods and none of them spilled over to masters (and were stuck in pending state instead), so NoSchedule taint is working as designed.
Great to hear, thanks for reporting back!