集群搭建完成后启动测试pod nginx
kubectl create deploy mytest --image=nginx -replicas=3 --port=80
default nginx-74d589986c-c2455 1/1 Running 0 9m18s 10.244.0.2 node2
在master测试
curl 10.244.0.2
ping 10.244.0.2
无响应
排查开始:
查看主机路由(因为正常情况流量应该过flannl)
root@master:~/week6# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 0 0 0 ens33
10.244.0.0 10.244.0.0 255.255.255.0 UG 0 0 0 flannel.1
10.244.2.0 10.244.2.0 255.255.255.0 UG 0 0 0 flannel.1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 ens33
发现只有本机路由到网关,并无flannl的对端路由
排查flannl
4: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default