When I followed the tutorial provided by KodeKloud on deploying with Kubeadm (CKA Certification Course – Certified Kubernetes Administrator | KodeKloud), I faced an error message stating, “The connection to the server :6443 was refused - did you specify the right host or port?” This error occurred while attempting to initialize a cluster with one master and one worker on the Hetzner Cloud, where each node had 2 CPUs and 2GB of RAM.
I’m not familiar with the Hetzner Cloud, but the tutorial in the CKA repo is what I’d recommend for getting a cloud-based cluster up and working for testing and self-teaching. I can’t really tell what’s wrong with your cluster based on the information you’ve supplied, but I’d recommend looking at the Node Setup page in the tutorial, since that’s where most students go wrong.