环境信息:
K3s 版本:
v1.25.7+k3s1
节点 CPU 架构、操作系统和版本::
Linux xiaochong2022 4.15.0-211-generic #222-Ubuntu SMP Tue Apr 18 18:55:06 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
集群配置:
1 servers, 0 agents
问题描述:
ubuntu 18.04.6安装k3s报错,之前安装都是好好的,突然就用不了了
iptables 版本
iptables -V
iptables v1.6.1
复现步骤:
预期结果:
实际结果:
附加上下文/日志:
May 16 21:46:41 xiaochong2022 k3s[6439]: E0516 21:46:41.050298 6439 iptables.go:304] Failed to ensure iptables rules: error setting up rules: failed to setup iptables-restore payload: failed to check rule existence: running [/sbin/iptables -t nat -C FLANNEL-POSTRTG -s 10.42.0.0/16 ! -d 224.0.0.0/4 -m comment --comment flanneld masq -j MASQUERADE --wait]: exit status 2: Bad argument `’
[/details]
相关issue解决:
I found that setting prefer-bundled-bin: true in my /etc/rancher/k3s/config.yaml file also did the trick. Probably time to upgrade from 18.04 too.
创建对应目录和文件,再重新安装即可。
1 个赞