将一个节点作为 control-plane 加入集群,preflight 检查时出错,出错信息如下
[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 does not exist
[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=...`
To see the stack trace of this error execute with --v=5 or higher
参考 https://github.com/kubernetes/kubeadm/issues/1062 中的评论,通过下面2个命令解决了
modprobe br_netfilter
echo '1' > /proc/sys/net/ipv4/ip_forward