flannel网络配置问题


debian8.9 jessie
按照网上的方法配置完docker+flannel+etcd。发现每台机器的docker0 可以互相ping通,但是容器就ping不通。请大家给点建议。
docker版本:17.06.0-ce
两台机器的路由:
root@manage1:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.1.223.254 0.0.0.0 UG 0 0 0 eth0
10.1.222.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 flannel0
192.168.9.0 0.0.0.0 255.255.255.0 U 0 0 0 docker0

root@worker1:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.1.223.254 0.0.0.0 UG 0 0 0 eth0
10.1.222.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 flannel0
192.168.38.0 0.0.0.0 255.255.255.0 U 0 0 0 docker0

docker的启动参数
root@worker1:~# ps -ef |grep docker
root 3045 1 0 10:54 ? 00:00:05 /usr/bin/dockerd -H fd:// --bip=192.168.38.1/24 --mtu=1472 --ip-masq=true
root 3049 3045 0 10:54 ? 00:00:00 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
root 3159 1042 0 10:54 pts/2 00:00:00 docker run -it efe10ee6727f
root 3182 3049 0 10:54 ? 00:00:00 docker-containerd-shim 9f84a2a66284ee15e093ad1581b5360971c33f440182c537d54321fca895531a /var/run/docker/libcontainerd/9f84a2a66284ee15e093ad1581b5360971c33f440182c537d54321fca895531a docker-runc
已邀请:

stirlingx

赞同来自:


cni0网桥没创建,flannel走到是cni0,不是docker0

要回复问题请先登录注册