rancher报错Not using `--random-fully` in the MASQUERADE rule for iptables because the local version of

rancher安装过程中,一直在报错导致安装失败:

Not using `--random-fully` in the MASQUERADE rule for iptables because the local version of iptables does not support it

原因是默认的iptables版本为v1.6.0不能被支持导致的,解决方法就是升级iptable是的版本,可以通过执行如下命令:

docker run -it rancher/hyperkube:v1.16.2-k8s1

在出现的命令行中,再执行

cat > /etc/apt/sources.list << EOF
deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
EOF

apt-get update

apt remove --purge iptables && \
apt autoremove -y && \
clean-install libip4tc0=1.6.2-1.1~bpo9+1 \
            libip6tc0=1.6.2-1.1~bpo9+1 \
            libiptc0=1.6.2-1.1~bpo9+1 \
            libxtables12=1.6.2-1.1~bpo9+1 \
            iptables=1.6.2-1.1~bpo9+1

将iptables的版本升级到1.6.2

此时,再启动一个新的终端界面执行:

[root@node1 ~]# docker ps|grep hyper
aec0112233        rancher/hyperkube:v1.16.2-k8s1                    "/bin/sh"   

于是执行docker commit将修改后的容器导出成镜像,并覆盖之前的镜像:

docker commit aec0112233 rancher/hyperkube:v1.16.2-k8s1  

重新开始安装worker结点的流程即可

 

 

参考:https://github.com/rancher/rancher/issues/23552

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值