温馨提示:这篇文章已超过453天没有更新,请注意相关的内容是否还可用!
摘要:在执行kubeadm join命令时遇到报错,可能是由于多种原因导致的。常见的问题包括网络配置错误、API服务器无法访问、证书问题或集群配置不匹配等。为了解决这个问题,首先需要确定具体的错误信息,然后根据错误信息逐一排查和修复。这可能涉及到检查网络设置、验证证书有效性、确保集群配置正确等步骤。如果遇到困难,可以参考相关文档或寻求社区帮助。
执行 kubeadm join 192.168.31.220:6443 --token 2fn4t4.syeegrav0nadt9mh --discovery-token-ca-cert-hash sha256:df5eee**********************************2e6e653aa83ea8c32 报如下错误

error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist

[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
解决办法
在/etc/sysctl.conf中添加:
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
执行sysctl -p
如果出现 缺少文件的现象
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: 没有那个文件或目录
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: 没有那个文件或目录
这是因为之前配置的br_netfilter没有启动
#驱动加载
modprobe br_netfilter
bridge
还没有评论,来说两句吧...