0

I'm learning Kubernetes but I have some issues to establish a communication between 2 pods from 2 different nodes. I've initiliazed my cluster (1 master and 2 workers) thanks to kubeadm, I'm using kube-router as a CNI and I'm on CentOs 7.

Here are some information about my configuration:

Master's IP: 165.132.163.60
Worker 1's IP : 153.228.224.220
Worker 2's IP : 55.38.47.200 
# kubectl get pods -o wide
NAME                           READY   STATUS    RESTARTS   AGE   IP           NODE             NOMINATED NODE   READINESS GATES
hello-world-69769f4b46-r8wrc   1/1     Running   0          78m   10.244.2.2   poc-03   <none>           <none>
httpd                          1/1     Running   0          79m   10.244.1.2   poc-02   <none>           <none>

ip route on the master

default via 154.132.163.254 dev eth0 proto dhcp metric 100
10.244.1.0/24 dev tun152228224220 proto 17 src 165.132.163.60
10.244.2.0/24 dev tun-543847200 proto 17 src 165.132.163.60
165.132.163.0/24 dev eth0 proto kernel scope link src 165.132.163.60 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
192.168.0.0/24 dev kube-bridge proto kernel scope link src 192.168.0.1

ip route on worker 1

default via 153.228.224.254 dev eth0 proto dhcp metric 100
10.244.0.0/24 dev tun-16413216360 proto 17 src 153.228.224.220
10.244.1.0/24 dev kube-bridge proto kernel scope link src 10.244.1.1
10.244.2.0/24 dev tun-543847200 proto 17 src 153.228.224.220
153.228.224.0/24 dev eth0 proto kernel scope link src 153.228.224.220 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1

ip route on worker 2

default via 55.38.47.254 dev eth0 proto dhcp metric 100
10.244.0.0/24 dev tun-16413216360 proto 17 src 55.38.47.200
10.244.1.0/24 dev tun152228224220 proto 17 src 55.38.47.200
10.244.2.0/24 dev kube-bridge proto kernel scope link src 10.244.2.1
55.38.47.0/24 dev eth0 proto kernel scope link src 55.38.47.200 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1

So when I try the following command :

kubectl -ti exec httpd -- curl 10.244.2.2

I have no response.

Can you please help me find out what's wrong.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.