迁移公司一个云服务时,要修改以下内核参数开启 bridge-nf-call-iptables:(k8s常规修改参数):
/etc/sysctl.conf末尾新增
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-arptables = 1
/sbin/sysctl -p结果报错了:
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: 没有那个文件或目录
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: 没有那个文件或目录
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-arptables: 没有那个文件或目录
解决方案就是:
modprobe br_netfilter
再重新/sbin/sysctl -p,问题解决了