Hi I have the same problem with you,
when I restart the ubuntu,and type kubectl get nodes
It always show
change@change-VirtualBox:~$ kubectl get nodes
The connection to the server 10.0.2.15:6443 was refused - did you specify the right host or port?
and I found how to solve this question.
- sudo -i
- swapoff -a
- exit
- strace -eopenat kubectl version
and you can type kubectl get nodes again.