0
votes

Setup a kubernetes cluster using three vms on virtualbox. one setup as the master and the other as worker nodes. Deployed pods on the cluster but the pods could not ping any pods that are on a different node but can ping pods on the same node

1
This is portal is for programmers to help each other in their problems and propose solutions. So please try to come up with programming source code along with your problem. Thank you for understanding.Ahmed Numaan
How are you pinging the pods on the other node? Are you referencing the pod name (I don't think that would work), or the IP (I think that works). Also you generally want to check the service that's attached to the pod so you can see the IP that you can access on.Neekoy
I execute the ping command from within the pod: kubectl exe -it pod_name -- /bin/bash and the execute the ping command to a pod on a different nodekhumalo
First step in debugging - can your VM's talk to each other? Can you ping one VM from within another VM? If that doesn't work, then Kubernetes has no chance. Which CNI plugin are you using?Marcin Romaszewicz
Usually in Kubernetes you communicate from a pod to a service, not directly pod-to-pod; and you communicate via TCP, not ICMP, and I wouldn't necessarily expect ping to prove much. What problem are you really trying to debug?David Maze

1 Answers

0
votes

Kubernetes uses a different approach to internal communication. In the basic DNS-operated network there are interchange packets between services not pods. Some of the operations use 'NAT'-ed network built on iptables and not low-level packed exchange. It may be needed to use an overlay network to achieve what you need.

Back to your issue. I may suggest you building services, and then try to ping each other via name using flannel or similar solution. You may find the foundations interesting and dive deeper in the network abstraction layer.