<p>I am attempting to setup a multi-node k8s cluster as per this <a href="https://techviewleo.com/deploy-kubernetes-cluster-on-debian-using-k0s/" rel="nofollow noreferrer">kOS Setup Link</a>, but I  face the error below when I try to join one of the nodes to the master node:</p>
<pre><code>    k0s token create --role=worker
    WARN[2022-01-12 13:55:31] no config file given, using defaults
    Error: failed to read cluster ca certificate from /var/lib/k0s/pki/ca.crt: open 
    /var/lib/k0s/pki/ca.crt: no such file or directory. check if the control plane is 
    initialized on this node
</code></pre>
<p>I verified from the control node that this file does, exist however:</p>
<pre><code>cd /var/lib/k0s/pki
ls
</code></pre>
<p>I am new to k8s setup from scratch, and a bit unsure which configuration item I need to fix (and where between master and worker nodes?).
My research shows that <em><strong>A token is required when joining a new worker node to the Kubernetes cluster -- This token is generated from the control node</strong></em>. It also says that <em><strong>When you bootstrap a cluster with kubeadm, a token is generated which expires after 24 hours</strong></em></p>
<p>When I try to check for the existence of a token on master node I get:</p>
<pre><code> kubeadm tokens list
-bash: kubeadm: command not found
</code></pre>
<p>I am unsure however if this is correct ( Is k0s <em><strong>even</strong></em> bootstrapped with <code>kubeadm</code>??).</p>
<p>However using k0s CLI syntax I can see that they are no tokens on the master:</p>
<pre><code>k0s token list
No k0s join tokens found
</code></pre>
<p>My question:</p>
<ol>
<li>What do I need to do for the file that is reporting as missing.</li>
<li>Is this error (possibly) related to the issue of token above and if so do I first need to regenerate the token at the master node end.</li>
<li>I have encountered multiple fixes at this <a href="https://github.com/kubernetes/kubernetes/issues/53889" rel="nofollow noreferrer">Github Issue</a> but I am not sure if any of them applies to my issue. Last thing I need is to break the current setup before I have even finished the cluster setup.</li>
</ol>
<p>Environment
Master node : Debian 10 Buster
Worker node : Debian 10 Buster</p>

Golide
<p>I've got the same error as you when I tried to run <code>k0s token create --role=worker</code> on the <strong>worker</strong> node.</p>
<p>You need to run <a href="https://techviewleo.com/deploy-kubernetes-cluster-on-debian-using-k0s/" rel="nofollow noreferrer">this command on the <strong>master</strong> node</a>:</p>
<blockquote>
<p>Next, you need to <strong>create a join token</strong> that the worker node will use to join the cluster. This token is generated from the control node.</p>
</blockquote>
<p>First you need to run <code>k0s token create --role=worker</code> on the <strong>master</strong> node to get a token and later <a href="https://techviewleo.com/deploy-kubernetes-cluster-on-debian-using-k0s/" rel="nofollow noreferrer">use this token on the <strong>worker</strong> node</a>:</p>
<blockquote>
<p>On the worker node, issue the command below.</p>
<pre><code>k0s worker &lt;login-token&gt; 
</code></pre>
</blockquote>
<p>So:</p>
<ul>
<li>generate a token on the <strong>master</strong> using <code>k0s token create --role=worker</code></li>
<li>use this token on the <strong>worker</strong> using <code>k0s worker &lt;login-token&gt; </code></li>
</ul>
<p>In my case I also needed to add <code>sudo</code> before both commands, so they looked like <code>sudo k0s token create --role=worker</code> and <code>sudo k0s worker &lt;login-token&gt; </code></p>
<p>You wrote:</p>
<blockquote>
<p>I am unsure however if this is correct ( Is k0s <em><strong>even</strong></em> bootstrapped with kubeadm ?? ).</p>
</blockquote>
<p>No, they are two different and independent solutions.</p>
