play-with-kubernetes.github.io
play-with-kubernetes.github.io copied to clipboard
Connection to the server was refused
I did kubeadm init --apiserver-advertise-address $(hostname -i) in node1 and got the expected result
in node2 I tried to join using kubeadm join 192.168.0.18:6443 --token gxw9c8.nqfqoldbtfj569r1 --discovery-token-ca-cert-hash sha256:d9e42fbdd58506e20d9d544de90b798e7bd90c6896edd92d0bb40d6254502f78
which got me a lot of repeating [discovery] Failed to request cluster info, will try again: [Get https://192.168.0.18:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: dial tcp 192.168.0.18:6443: connect: connection refused] ^Z
back in node1 I decided to do kubectl apply -n kube-system -f \
"https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 |tr -d '\n')"
and got The connection to the server 192.168.0.18:6443 was refused - did you specify the right host or port?
I'm sure this is my not knowing anything, but on the other hand it should probably handguide me through this problem.