workder节点运行命令提示加入成功,但是master查看没有得到
来源:1-6 向集群加入worker节点
喵的薛定谔i
2018-10-04
根据之前问的,master上init的时候,加上了
--apiserver-cert-extra-sans=xxxx
,xxx是master的公网IP地址,命令如下
kubeadm reset
kubeadm init --apiserver-advertise-address=0.0.0.0 --kubernetes-version=1.10.2 --apiserver-cert-extra-sans=xxxx --pod-network-cidr=192.168.16.0/20
显示成功,并有加入的命令
- 在k8s2机器上运行join命令(xxx是master的公网IP)
kubeadm join xxx:6443 --token xmru8j.n3vi8uomzgrzm735 --discovery-token-ca-cert-hash sha256:1688d80014c826cbcc06008ac3765c011829429fa154197e8d94a3a9224c0ab2
提示成功:
[preflight] Running pre-flight checks.
[WARNING FileExisting-crictl]: crictl not found in system path
Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl
[discovery] Trying to connect to API Server "xxxxx:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://xxxxx:6443"
[discovery] Requesting info from "https://xxxxx:6443" again to validate TLS against the pinned public key
[discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server "180.76.161.14:6443"
[discovery] Successfully established connection with API Server "xxxxx:6443"
This node has joined the cluster:
* Certificate signing request was sent to master and a response
was received.
* The Kubelet was informed of the new secure connection details.
问题是:
- 切换至master分支之后,验证是否加入,仍然只显示master这个node
kubectl get nodes
admin.conf
文件scp过去之后,在k8s2上面运行kubectl get nodes
的时候,没有任何反应,卡住了,只能ctl + c退出
写回答
2回答
-
喵的薛定谔i
提问者
2018-10-09
已经解决
012019-11-15 -
春松
2018-10-05
我的是修改hostname及hosts文件。
012018-10-06
相似问题