request service from minion only forward to local deployed pod in that minion

11/15/2016

I am working on a POC, and i find out some strange behavior after setting up my kubernetes cluster In fact, i am working on a topology of one master and two minions. When i tried to make up 2 pods into each minion and expose a service for them, it turned out that when i try to request the service from the master, nothing is returned (any response from 2 pods) and when i try to request the service from a minion, only the pod deployed in that minion respond but the other no.

-- mootez
kubernetes

1 Answer

11/15/2016

This can heavily depend on how your cluster is provisioned. For starters, you need to validate how networking is set up and if it works as kubernetes expects. Said short, if you launch two pods (on separate nodes), they should get IPs from their dedicated per node ranges, and be able to route that between nodes. You can use some small(ish) base image (alpine/debian/ubuntu etc.), with something like sleep 1d , exec into them interactively with bash and simply ping one from the other. If it does not work, your network setup is broken.

Make sure you test between pods, not directly from node host OS. In some configurations node is unable to access service IPs due to routing concerns, but pod-to-pod works fine (seen this in some flannel configurations)

Also, your networking is probably provided by some overlay network solution like flannel, weave, calico etc. so check their respective logs for signs of problems.

-- Radek 'Goblin' Pieczonka
Source: StackOverflow