kubectl get nodes - The connection was refused
I have same issue and was able to fix it.
Use the below command to disable swap temporary, but if your system reboots, issue will re-occurs
sudo -iswapoff -a
Permanent fix is to remove the swap entry from /etc/fstabEdit vim /etc/fstab