默认token的有效期为24小时,当过期之后,该token就不可用了。
kubeadm token create //如过期,创建token
[root@kube-node1 home]# kubeadm token list
TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS
1eg5gp.zmys0lirp7bikh7l 8h 2018-07-31T17:07:35+08:00 authentication,signing <none> system:bootstrappers:kubeadm:default-node-token
获取ca证书sha256编码hash值
openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //'
5443ce1592bb287ba362cedd3128c261c108c2c44fd48b5a60b90ee4e8460a3f
节点加入集群
kubeadm join --token 1eg5gp.zmys0lirp7bikh7l --discovery-token-ca-cert-hash sha256:5443ce1592bb287ba362cedd3128c261c108c2c44fd48b5a60b90ee4e8460a3f 192.168.0.93:6443 --skip-preflight-checks
网友评论