<p>I did command om master node</p>
<pre><code>microk8s add-node
From the node you wish to join to this cluster, run the following:
microk8s join 192.168.0.xxx:25000/token

If the node you are adding is not reachable through the default interface you can use one of the following:
 microk8s join 192.168.0.yyy:25000/token
 microk8s join 192.168.0.xxx:25000/token
 microk8s join 172.17.0.1:25000/token
</code></pre>
<p>and on another machine i did</p>
<pre><code>microk8s join 192.168.0.xxx:25000/token
Contacting cluster at 192.168.0.xxx
Waiting for this node to finish joining the cluster. .. .. .. .. .. .. .. .. .. ..
</code></pre>
<p>it ended without messages but on master node command output <code>microk8s.kubectl get no</code> doesn'show this node only default node</p>

<p>Solution may be  as @Sultan Zhumatayev said downgrading <a href="https://microk8s.io/" rel="nofollow noreferrer">microk8s</a> to <code>1.18</code> and node will join and appear in node list.</p>
<p>However firstly to check where problem lies you can execute commands: <code>$ microk8s status</code> and <code>$ microk8s inspect</code> for a deeper inspection</p>
<p>Another possible solutions:</p>
<p><strong>1.</strong> If you turn on firewall (ufw), consider allowing all node ips like: ufw allow from  <code>xxx.xxx.xxx.xxx</code>  (repeat for all nodes including the current node).  If your instances instances having both an internal and public network, they could try talking to the wrong ones. After taking away the external interfaces, it will work properly.  Take a look: <a href="https://www.reddit.com/r/kubernetes/comments/j2pe17/microk8s_join_failing_how_to_troubleshoot/" rel="nofollow noreferrer">microk8s-join-stuck</a>.</p>
<p><strong>2.</strong> Try to disconnect the node from the cluster. Run on the node the following command:</p>
<pre><code>$ sudo microk8s leave
</code></pre>
<p>Then you can try to connect it again, by running add-node on the master:</p>
<pre><code>$ sudo microk8s add-node
</code></pre>
<p>and then the respective command on the node again:</p>
<pre><code>$ sudo microk8s join
</code></pre>
<p>Read more: <a href="https://github.com/ubuntu/microk8s/issues/1401" rel="nofollow noreferrer">microk8s-join</a>.</p>
<p>See also: <a href="https://kubernetes.io/blog/2019/11/26/running-kubernetes-locally-on-linux-with-microk8s/" rel="nofollow noreferrer">microk8s</a>.</p>
