K8S安装node加入到节点错误Running pre-flight checks百分百解决,其他的都是片面的

Posted 码海兴辰

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了K8S安装node加入到节点错误Running pre-flight checks百分百解决,其他的都是片面的相关的知识,希望对你有一定的参考价值。


天下文章一大把,往往少部分才能解决细问题

一:错误报错

Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.7. Latest validated version: 19.03
[WARNING Hostname]: hostname "k8snode1" could not be reached
[WARNING Hostname]: hostname "k8snode1": lookup k8snode1 on 114.114.114.114:53: no such host
error execution phase preflight: couldnt validate the identity of the API Server: Get "https://cluster-endpoint:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": dial tcp 172.100.101.60:6443: connect: no route to host

我看网上说什么时间没有同步或者token过期,这个原因可能有些人有,但是我相信大部分人不是,其实很简单就是master主节点没有关闭防火墙的缘故

二:解决方法

关闭master主节点的防火墙

systemctl disable firewalld --now

如下操作:

K8S安装node加入到节点错误Running

三:效果

现在进行加入

kubeadm join cluster-endpoint:6443 --token q2bf0w.c86t03p42oaelbcs     --discovery-token-ca-cert-hash sha256:4310d694be8295f3b6eba06f44e98c0f589f610e8f59af3d00e62012aaafad1b 

K8S安装node加入到节点错误Running

这不就加进去了

 运行kubectl get nodes 可以看到子节点已经加进去了

K8S安装node加入到节点错误Running

 

 

以上是关于K8S安装node加入到节点错误Running pre-flight checks百分百解决,其他的都是片面的的主要内容,如果未能解决你的问题,请参考以下文章

node节点加入k8s集群失败

k8s安装问题摘要

k8s node节点重新加入集群失败问题解决

解决k8s集群中Redis Cluster故障

k8s node节点剔除与增加

k8s 安装node_exporter