<p>When we launch a master prime node the node creates tokens for worker and master nodes with a ttl.</p>
<p>According to documentation <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-token/#cmd-token-generate" rel="noreferrer">kubeadm token</a> (I also have tested and it works) we can issue a command and get a new token (with default ttl 24h):</p>
<pre class="lang-sh prettyprint-override"><code>kubeadm token create --print-join-command
</code></pre>
<p>I am trying to figure out if I want to add a new plane node (secondary master) how can I create a relevant token?</p>
<p>I tried passing some flags e.g.:</p>
<pre class="lang-sh prettyprint-override"><code>kubeadm token create --print-join-command --control-plane
</code></pre>
<p>but it fails (of course) since this flag is not recognized.</p>
<p>I found also through the documentation that we can do it with a direct link to config file e.g. ref <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/#file-or-https-based-discovery" rel="noreferrer">kubeadm-join/file or https based discovery</a>:</p>
<pre class="lang-sh prettyprint-override"><code>kubeadm join --discovery-file path/to/file.conf # (local file)
kubeadm join --discovery-file https://url/file.conf # (remote HTTPS URL)
</code></pre>
<p>In my case I do not have a local conf file or planning to use a url link.</p>
<p>Is there any other way to create a new token using a command for plane nodes and not worker nodes?</p>

<p>You need to run on master</p>
<pre><code>kubeadm init phase upload-certs --upload-certs
</code></pre>
<p>Remember the output.</p>
<p>Then you need to run on master</p>
<pre><code>kubeadm token create --print-join-command
</code></pre>
<p>Then compose joining command for joinning-master-node from this output and add to it <code>--control-plane --certificate-key xxxx</code></p>
<p>See this video to explain with example:
<a href="https://www.youtube.com/watch?v=27v36t-3afQ" rel="noreferrer">https://www.youtube.com/watch?v=27v36t-3afQ</a>
The most interesting is from 20:40.
There are some 'experimental' words in video due to older version.</p>
