昨天搭建好的集群,今天想加一台新节点时运行命令报错
kubeadm join --token c1d408.5b9a43bfa2926ddc 192.168.0.232:6443 --discovery-token-ca-cert-hash sha256:66906568e7ca6aafa86cd1e6e1d0dc60721aae8b08f5daff347f6a380e81fd4a
#报错如下
Failed to connect to API Server "192.168.0.240:6443": there is no JWS signed token in the cluster-info ConfigMap. This token id "c1d408" is invalid for this cluster, can't connect
原因
官方说是为了安全,初始化token后会在24小时候会被master删除,
解决办法
在master节点重新生成一个
kubeadm token create
客户端重新加入
kubeadm join --token c1d408.5b9a43bfa2926ddc 192.168.0.232:6443 --discovery-token-ca-cert-hash sha256:66906568e7ca6aafa86cd1e6e1d0dc60721aae8b08f5daff347f6a380e81fd4a