11-4 kubeadm join加入worker
来源:11-4 共享存储 --- PV、PVC和StorageClass(上).mp4

yl_testimooc3804939
2022-11-29
#生成TOKEN
[root@node-1 ~]# kubeadm token create --ttl 0
dho71m.e2f76izf21bqwo8e
#生成hash
[root@node-1 pki]# openssl x509 -pubkey -in /etc/kubernetes/ssl/ca.pem | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //'
5b32d5d88f791de2f7e649bf4a6973e777d3485f0ab0b993deca8b19348aba2d
#加入worker,172.16.1.21为master的node-1节点IP。
[root@gluster-01 ~]# kubeadm join 172.16.1.21:6443 --token dho71m.e2f76izf21bqwo8e --discovery-token-ca-cert-hash sha256:5b32d5d88f791de2f7e649bf4a6973e777d3485f0ab0b993deca8b19348aba2d
[preflight] Running pre-flight checks
error execution phase preflight:
couldn't validate the identity of the API Server:
could not find a JWS signature in the cluster-info ConfigMap for token ID "dho71m"
To see the stack trace of this error execute with --v=5 or higher
老师,请问
1、这个加入worker的步骤错了吗?
(
经网络搜索,都说是token过期或hash错误。
一、但我这个token是永久的。
二、hash根据ca.pem证书生成正确吗?我看网络上都用ca.crt证书,咱们教程里没这个ca.crt。
)
2、这个还有别的解决方案吗?
谢谢老师。
写回答
1回答
-
刘果国
2022-11-29
试试这个:kubeadm token create --print-join-command > kubeadm_worker_join
062022-12-01
相似问题