添加工作节点失败

来源:1-6 向集群加入worker节点

慕九州9557276

2018-09-29

老师
k8s2在执行kubeadm join后,能够在k8s1上看到node但是状态一直是NotReady。
root@k8s1:/home/maxiaohua# kubectl get nodes

NAME      STATUS     ROLES     AGE       VERSION
k8s1      Ready      master    20m       v1.11.3
k8s2      NotReady   <none>    4m        v1.11.3

k8s3在执行kubeadm join后一直尝试连接但总通不过。

[discovery] Failed to request cluster info, will try again: [Get https://10.0.2.6:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid]
[discovery] Failed to request cluster info, will try again: [Get https://10.0.2.6:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid]
[discovery] Failed to request cluster info, will try again: [Get https://10.0.2.6:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid]

请问是什么原因k8s110.0.2.6

写回答

1回答

tonybai

2018-09-29

worker node上的kubelet负责向apiserver注册节点,现在的问题似乎就是注册失败,可以先检查一下网络是否是通的?如果网络通,从你提供的日志来看应该是证书过期或失效。因为join所使用的token是有有效期的。具体问题可以查看node上kubelet的日志。使用journalctl查看

0
2
喵的薛定谔i
回复
慕九州9557276
请问你是如何解决的?我也是遇到了Failed to request cluster info, will try again的问题
2018-09-30
共2条回复

Kubernetes实战 高可用集群搭建,配置,运维与应用

以生产为目标,原理+操作, Kubernetes结合典型云原生应用

794 学习 · 196 问题

查看课程