在调整内核参数的时候会报错

sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: 没有那个文件或目录
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: 没有那个文件或目录

处理办法

[root@localhost ~]# modprobe br_netfilter

在开启ipvs 支持

[root@k8s-master01 ~]#bash /etc/sysconfig/modules/ipvs.modules
modprobe: FATAL: Module nf_conntrack_ipv4 not found.
找不到模块


处理办法
没有
知道的可以告诉我一下,谢谢

初始化主节点的时候

[preflight] Running pre-flight checks
	[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 18.09
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 contents are not set to 1
	[ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

处理办法

[root@k8s-master01 ~]# echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
[root@k8s-master01 ~]# echo 1 > /proc/sys/net/ipv4/ip_forward

把添加子节点的时候报错,跟初始化主节点的报错一样

[root@k8s-node01 ~]# kubeadm join 10.14.2.150:6443 --token ww6iai.v149eb6e6pp9y4lq     --discovery-token-ca-cert-hash sha256:69960927c75b6bb4e11e30493308ac85c679511082e188a49bbab8f144b3f739


[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

处理办法

[root@k8s-master01 ~]# echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
[root@k8s-master01 ~]# echo 1 > /proc/sys/net/ipv4/ip_forward

这个也是在添加子节点的时候报错

[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
error execution phase preflight: unable to fetch the kubeadm-config ConfigMap: this version of kubeadm only supports deploying clusters with the control plane version >= 1.20.0. Current version: v1.15.1
To see the stack trace of this error execute with --v=5 or higher

原因
报错指定版本后,由于你的kubeadm版本过高,不支持1.15.1版本的安装而导致失败。

处理办法
安装指定版本的kubunetes。下载一个支持1.15.1版本的kubeadm,然后用新的低版本kubeadm安装k8s集群

[root@k8s-node01 ~]# yum remove kubelet   kubeadm  kubectl
[root@k8s-node02 ~]# yum remove kubelet   kubeadm  kubectl
[root@k8s-node02 ~]# yum -y install kubeadm-1.15.1 kubectl-1.15.1 kubelet-1.15.1
[root@k8s-node02 ~]# yum -y install kubeadm-1.15.1 kubectl-1.15.1 kubelet-1.15.1
Logo

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

更多推荐