<p>I am following up guide [1] to create multi-node K8S cluster which has 1 master and 2 nodes. Also, a label needs to set to each node respectively.</p>

<pre><code>Node 1 - label name=orders 
Node 2 - label name=payment
</code></pre>

<p>I know that above could be achieved running kubectl command</p>

<pre><code>kubectl get nodes
kubectl label nodes &lt;node-name&gt; &lt;label-key&gt;=&lt;label-value&gt;
</code></pre>

<p>But I would like to know how to set label when creating a node. Node creation guidance is in [2]. </p>

<p>Appreciate your input.</p>

<p>[1] <a href="https://coreos.com/kubernetes/docs/latest/getting-started.html" rel="noreferrer">https://coreos.com/kubernetes/docs/latest/getting-started.html</a></p>

<p>[2] <a href="https://coreos.com/kubernetes/docs/latest/deploy-workers.html" rel="noreferrer">https://coreos.com/kubernetes/docs/latest/deploy-workers.html</a></p>

<p>In fact there is a trivial way to achieve that since 1.3 or something like that. </p>

<p>What is responsible for registering your node is the kubelet process launched on it, all you need to do is pass it a flag like this <code>--node-labels 'role=kubemaster'</code>. This is how I differentiate nodes between different autoscaling groups in my AWS k8s cluster.</p>
