Execute the command, and then try kubectl get nodes
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $( id -u ) : $( id -g ) $HOME/.kube/config
If not, execute kubectl get nodes –insecure-skip-tls-verify and try