一.问题现象
操作系统是centos7.9,kubernetes 1.16的集群节点报节点不可用,尝试重启docker和kubelet服务发现启动不了
docker启动报错有Perhaps iptables or your kernel needs to be upgraded和Running iptables --wait -t nat -L -n failed提示。
二.排查和验证过程
$ iptables -nvL -t nat iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.发现以上这个错误
此时发现没有 nat 表,我们手动加载此驱动:
$ modprobe iptable_nat modprobe: ERROR: Error running install command for nf_conntrack modprobe: ERROR: could not insert 'iptable_nat': Operation not permitted
此时发现无法正常加载,然后再执行命令如下,添加 nf_conntrack