projectcalico / canal

Policy based networking for cloud native applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pod ip cannot ping successfully when install cancal as k8s network componet

tingweiwu opened this issue · comments

Expected Behavior

pod ip ping successfully from host

Current Behavior

pod ip ping failed from host
[root@host-10-31-3-107 /]# ping 10.244.3.4
PING 10.244.3.4 (10.244.3.4) 56(84) bytes of data.
From 10.31.3.107 icmp_seq=1 Destination Host Unreachable
From 10.31.3.107 icmp_seq=2 Destination Host Unreachable
From 10.31.3.107 icmp_seq=3 Destination Host Unreachable

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Calico version:
    quay.io/calico/node:v3.0.3
    quay.io/calico/cni:v2.0.1

  • Flannel version:
    quay.io/coreos/flannel:v0.9.1-amd64

  • Orchestrator version:

  • Operating System and version:

  • Link to your project (optional):
    kubernetes/kubernetes#62310

additionally info

when i install flannel as k8s network componet ,i get container ip and route like this
[root@rc-centos-jfjrp /]# io route
bash: io: command not found
[root@rc-centos-jfjrp /]# ip route
default via 172.30.87.1 dev eth0
172.30.87.0/24 dev eth0 proto kernel scope link src 172.30.87.6
[root@rc-centos-jfjrp /]# ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:AC:1E:57:06
inet addr:172.30.87.6 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:20625 errors:0 dropped:0 overruns:0 frame:0
TX packets:17740 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:35372984 (33.7 MiB) TX bytes:963726 (941.1 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

when i install cancel,,i get container ip and route like this
[root@rc-centos-gpzf7 /]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 169.254.1.1 0.0.0.0 UG 0 0 0 eth0
169.254.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
[root@rc-centos-gpzf7 /]# ifconfig
eth0 Link encap:Ethernet HWaddr 22:5B:5E:C9:F9:EA
inet addr:10.244.4.15 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11227 errors:0 dropped:0 overruns:0 frame:0
TX packets:9356 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:36689219 (34.9 MiB) TX bytes:528938 (516.5 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2368 (2.3 KiB) TX bytes:2368 (2.3 KiB)

Are the flannel and calico pods running successfully in kubernetes? If not you should check the logs (with kubectl logs) of any failing components.