使用Rockey操作系统运行rancher镜像报错iptables is not available on this host解决方法
参考
https://blog.csdn.net/u011197085/article/details/138143476
- 环境查看
# cat /etc/redhat-release
Rocky Linux release 9.3 (Blue Onyx)
# uname -a
Linux Rocky9K8SMaster003021 5.14.0-362.18.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 11 13:49:23 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
- 故障现象
运行Rancher镜像时docker不停重启
查看docker日志有以下报错信息
# k3s exited with: exit status 1
# iptables is not available on this host
- 原因分析
没有加载iptables内核模块 - 解决方法
手动加载模块
# sudo modprobe iptable_nat
# sudo modprobe iptable_filter
设置到配置文件
# cat /etc/modules-load.d/modules.conf
iptable_nat
iptable_filter
重启
# reboot