我这边worker节点加入master节点的时候,显示成功了
kubeadm join xxxxxx:6443 --token i80udh.4xfp36gi4twjsor7 --discovery-token-ca-cert-hash sha256:144160ee24e7ddb1e5ed4e58a971e4f6747071f6b371eae64b1796a4a91a8cdf
xxx是我的master节点的公网IP
但是在master节点查看的时候,没有显示加入,在k8s2里面查看运行的日志,显示说:
failed to run Kubelet: cannot create certificate signing request:Post https://192.168.0.2:6443/apis/certificates.k8s.io/v1beta1/certificatesigningrequests: dial tcp 1
后面显示的是master的私有IP,我join到master里面的时候是通过公网IP加入的,因为master与worker的私网之间不互通