k8s version: 1.20.1
flannel
cni网络插件
解决:
在node节点执行
cat /var/run/flannel/subnet.env
FLANNEL_NETWORK=10.244.0.0/16
FLANNEL_SUBNET=10.244.8.1/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
执行
iptables -t nat -I POSTROUTING -s 10.244.0.0/16 -j MASQUERADE
k8s version: 1.20.1
flannel
cni网络插件
解决:
在node节点执行
cat /var/run/flannel/subnet.env
FLANNEL_NETWORK=10.244.0.0/16
FLANNEL_SUBNET=10.244.8.1/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
执行
iptables -t nat -I POSTROUTING -s 10.244.0.0/16 -j MASQUERADE