title: The connection to the server 10.0.x.x:6443 was refused after restarting the VM where kubernetes master was installed using kubeadm
body: <p>I installed a Kubernetes master using kubeadm sucessfully on a VM (VirtualBox). The problem is that if I stop the machine and restart it the master node seems to be down:</p>
  
  <pre><code>kubectl get nodes
  The connection to the server 10.0.x.x:6443 was refused - did you specify the right host or port?
  </code></pre>
  
  <p>How can I make sure it will always be up after restarting the VM?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>After restarting VM this is what I have to do to make the master node start:</p>
  
  <pre><code>sudo swapoff -a
  sudo systemctl restart kubelet.service
  </code></pre>
  
  <p>Why? How can I fix it so that it starts without having to input that?</p>