kubeadm join 超时报错 error execution phase kubelet-start: error uploading crisocket: timed out waiting for the condition

kubeadm join 超时报错 error execution phase kubelet-start: error uploading crisocket: timed out waiting for the condition

问题分析:

可能是之前加入过k8s

解决方法:

kubeadm reset

之后重新加入即可。

 

报错:[kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get “http://localhost:10248/healthz”: dial tcp [::1]:10248: connect: connection refused.

问题分析:

之前我的Docker是用yum安装的,docker的cgroup驱动程序默认设置为system。默认情况下Kubernetes cgroup为systemd,我们需要更改Docker cgroup驱动,

问题解决:

cat > /etc/docker/daemon.json << EOF

{

  "registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"],

  "exec-opts": ["native.cgroupdriver=systemd"]

}
EOF


systemctl restart docker
docker info

之后在node节点执行

kubeadm join 192.168.1.35:6443 --token jeemo6.q7nxl1rrc81kh76h \
--discovery-token-ca-cert-hash sha256:7a433336427311c06ae00e06d5a04a7d89ffb509fba7eb48b6b24503b6778ba9

 

注意:192.168.1.35是master节点IP

 

posted @ 2022-03-20 22:54  cloud-qing0212  阅读(2976)  评论(0编辑  收藏  举报