<p>I am provisioning a Kubernetes cluster from scratch (reasons). Its a local setup inside VM, and everything is fine, except the <code>master</code> node is created as schedulable.</p>
<p>I have tried assigning the <code>master</code> label and appropriate taint to node by passing required arguments to kubelet binary (doesn't solve the problem):</p>
<pre><code>--register-with-taints=node-role.kubernetes.io/master=:NoSchedule
--node-labels=master,node-role.kubernetes.io/master=&quot;&quot;
</code></pre>
<p>Here is the output from <code>kubectl describe &lt;node&gt;</code>:</p>
<pre><code>Name:               myNodeName
Roles:              master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/hostname=myHostName
                    master=
                    node-role.kubernetes.io/master=
Annotations:        node.alpha.kubernetes.io/ttl=0
                    volumes.kubernetes.io/controller-managed-attach-detach=true
CreationTimestamp:  Tue, 03 Jul 2018 05:56:53 +0000
Taints:             node-role.kubernetes.io/master=true:NoSchedule
Unschedulable:      false
</code></pre>
<p>How do I set this node as Unschedulable? The documentation doesn't really specify this (feel free to direct to appropriate part of the documentation, in case I missed something).</p>
<p>PS: The labels/taints mentioned above were present before the node was created/registered.</p>

<p>Taints get us a possibility to mark a node in order to prevent scheduler from using it for certain Pods with a <code>NoSchedule</code> parameter, and they have special values which Kubernetes Scheduler uses on the planning step. Pods by default cannot be spawned on nodes with taints until you will add <code>tolerations</code> which will allow scheduler to create pods on nodes with taints specified in <code>toleration</code> configuration; therefore, as per your node description, you have successfully registered this node as <code>NoSchedule</code> and it means that Pods will not be scheduled on this node.</p>
<blockquote>
<p>Taints:             node-role.kubernetes.io/master=true:NoSchedule</p>
</blockquote>
<p>Alternatively, you can use <code>kubectl cordon NODE</code> command to mark the node as <a href="https://kubernetes.io/docs/concepts/architecture/nodes/" rel="noreferrer">unschedulable</a>; therefore it will disable scheduling for the node at all, so Kubernetes Scheduler will just ignore it in the process of planning workload, and it reflects in your node configuration like:</p>
<blockquote>
<p>Unschedulable:      true</p>
</blockquote>
