无法执行kubeadm join 望解答!!!谢谢
来源:4-8 安装配置worker node节点

慕慕7580827
2021-06-28
按着老师的步骤检查了好几遍,配置上没看出什么问题,但是kubeadm join不work, 还望老师能答疑解惑
[centos@ip-192-168-10-87 ~]$ sudo kubeadm join 192.168.10.33:6443 --token 1460at.e6c9g8r3sqmj0q00 --discovery-token-ca-cert-hash sha256:041a5293a7192d29edb782196d24a0a2b222921bda677fa697e2f3e7f05fa80c
[preflight] Running pre-flight checks
error execution phase preflight: couldn't validate the identity of the API Server: Get "https://192.168.10.33:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
To see the stack trace of this error execute with --v=5 or higher
用了–v=5 来查看详细输出, 发现是下面这个错误
I0628 05:03:46.481513 24943 token.go:78] [discovery] Created cluster-info discovery client, requesting info from "192.168.10.33:6443"
I0628 05:03:56.482564 24943 token.go:215] [discovery] Failed to request cluster-info, will try again: Get "https://192.168.10.33:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I0628 05:04:12.390266 24943 token.go:215] [discovery] Failed to request cluster-info, will try again: Get "https://192.168.10.33:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I0628 05:04:28.801624 24943 token.go:215] [discovery] Failed to request cluster-info, will try again: Get "https://192.168.10.33:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I0628 05:04:44.799075 24943 token.go:215] [discovery] Failed to request cluster-info, will try again: Get "https://192.168.10.33:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I0628 05:05:00.456249 24943 token.go:215] [discovery] Failed to request cluster-info, will try again: Get "https://192.168.10.33:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
但是master节点上所有的service都运行没问题啊
[centos@master ~]$ kubectl get node
NAME STATUS ROLES AGE VERSION
master Ready master 6h21m v1.19.3
[centos@master ~]$ kubectl get po -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-6d56c8448f-9j2p6 1/1 Running 0 6h21m
coredns-6d56c8448f-h4k4h 1/1 Running 0 6h21m
etcd-master 1/1 Running 0 6h21m
kube-apiserver-master 1/1 Running 0 6h21m
kube-controller-manager-master 1/1 Running 0 6h21m
kube-flannel-ds-tzmt8 1/1 Running 0 90m
kube-proxy-94cw4 1/1 Running 0 6h21m
kube-scheduler-master 1/1 Running 0 6h21m
还望老师能够指点下,看看到底哪里出了问题,谢谢!
写回答
1回答
-
清风
2021-07-01
看起来是网络链接问题,能ping成功吗,把防火墙策略打开
012021-07-14
相似问题
初始化kubeadm问题
回答 1
继kubelet服务无法起来的新提问
回答 2