k8s启动异常bridge-nf-call-iptables contents are not set to 1
k8s启动异常bridge-nf-call-iptables contents are not set to 1异常信息W0221 11:58:00.4897376787 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubepro
·
k8s启动异常bridge-nf-call-iptables contents are not set to 1
异常信息
W0221 11:58:00.489737 6787 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.18.0
[preflight] Running pre-flight checks
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
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
分析原因
- 网络设置错误,/proc/sys/net/bridge/bridge-nf-call-iptables 值应该设置为 1
解决方法
- 将桥接的IPv4流量传递到iptables的链
cat > /etc/sysctl.d/k8s.conf << EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
- 使系统修改生效
sysctl --system
更多推荐
已为社区贡献2条内容
所有评论(0)