<p>I'm following <a href="https://linuxconfig.org/how-to-install-kubernetes-on-ubuntu-18-04-bionic-beaver-linux" rel="nofollow noreferrer">this guide</a> on how to set up a kubernetes swarm.</p>

<p>My swarm will be as follows:</p>

<ul>
<li>10.0.2.1: swarm1 (master)</li>
<li>10.0.2.2: swarm2 (worker)  (currently trying to setup a single node swarm)</li>
<li>10.0.2.3: swarm2 (worker) (not yet provisioned)</li>
</ul>

<p>I followed it and got up to the part where I enter the command: </p>

<p><code>kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml</code></p>

<p>And once I enter that, I get an error: </p>

<blockquote>
  <p>unable to recognize "<a href="https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml" rel="nofollow noreferrer">https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml</a>": Get <a href="https://10.0.2.1:6443/api?timeout=32s" rel="nofollow noreferrer">https://10.0.2.1:6443/api?timeout=32s</a>: dial tcp 10.0.2.1:6443: connect: connection refused
  unable to recognize </p>
</blockquote>

<p>Which seems to mean that the kubernetes master isn't running properly.  How can I start the server so it can connect?</p>

<p>This is a not enough privilege error. Either you did not run this:</p>

<p><code>mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config</code></p>

<p>Or there is an admin.conf from previous inits. In this case while running second command and seeing  <code>cp: overwrite /home/aurelius/.kube/config'?</code>  make sure you type <code>yes</code> and press Enter. </p>
