k8s token忘记或过期(24h)

/ 服务器 / 1070浏览
[root@local250-k8s-node2 ~]# kubeadm join --token abcdef.0123456789abcdef 192.168.40.110:6443 --discovery-token-ca-cert-hash sha256:71a31198d3406a878f4f4dc09b283d341611a3123e9b1afc40c9e4b207bea331
W0317 22:34:49.714479    2326 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[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 "abcdef"
To see the stack trace of this error execute with --v=5 or higher

token时间24h,重新生成

[root@local250-k8s-master ~]#  kubeadm token create
W0317 22:41:46.336695   16816 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
xuttan.ipt0nups7ocj1829
[root@local250-k8s-master ~]# openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //'
71a31198d3406a878f4f4dc09b283d341611a3123e9b1afc40c9e4b107bea339
————————————————