环境:

DinD (docker in docker)模型下,sysbox内部启动centos,搭建k8s node节点加入集群;

问题:kubeadm join时提示如下healthz错误

The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.

解决办法:

有问题的Node节点下找到kubeadm.conf配置文件

find /* -name '*kubeadm.conf'
/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf

增加一行如下:

Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --fail-swap-on=false"

重启kubelet即可: 

systemctl daemon-reload

systemctl restart kubelet

 最后,重新执行kubeadm reset -f 重置node节点

重新kubeadm join即可;

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐