calico报错Calico requires net.ipv4.conf.all.rp_filter to be set to 0 or 1

网上的文章都是介绍,在 k8s 中部署时的解决方案:如下
calico报错Calico requires net.ipv4.conf.all.rp_filter to be set to 0 or 1
calico报错:

 int_dataplane.go 1018: Kernel's RPF check is set to 'loose'. This would allow endpoints to spoof their IP address. Calico requires net.ipv4.conf.all.rp_filter to be set to 0 or 1. If you require loose RPF and you are not concerned about spoofing, this check can be disabled by setting the IgnoreLooseRPF configuration parameter to 'true'.

解决方法:

kubectl -n kube-system set env daemonset/calico-node FELIX_IGNORELOOSERPF=true 

而我是通过 docker 直接去装 Calico 的,以上方法行不通;

仔细看报错中,有两处提示

  • Calico requires net.ipv4.conf.all.rp_filter to be set to 0 or 1.
  • setting the IgnoreLooseRPF configuration parameter to 'true

网上大部分解决方案即为第二种方案(如上文)。

既然第二种行不通,直接用第一种修改 内核参数,应该同样能解决问题,执行如下命令

sysctl net.ipv4.conf.all.rp_filter=0

问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值