ip a 查看结果 flannel.1 i state UNKNOWN 并且五 inet
发现日志
device (flannel.1): state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
device (flannel.1): state change: unavailable -> unmanaged (reason 'connection-assumed') [20 10 41]
failed to add vxlanRoute (172.17.76.0/24 -> 172.17.76.0): network is down
首先删除
ip link delete flannel.1
在 /etc/sysctl.conf 中 设置 net.ipv4.ip_forward=1
systemctl restart network
systemctl restart flanneld
若发现两个节点flannel的ip 冲突 删除/var/run/flannel/subnet.env后再次重启flanneld