Kubernetes cannot access app via POD IP

7/19/2018

I set up a cluster with 2 machines, which are not in the same local subnet but they can connect each other, machine A is Master + Node and machine B is Node. Then I use flannel (subnet 172.16.0.0/16) as the network plugin. After deployed apps, I encountered a problem that I can access the app via POD IP on machine A, but I cannot access the same app on machine B via POD IP, and curl command would say No route to the host172.16.0.x`. I think there is no route rules to other machine, but I don't know how to configure the network. Could anyone help to explain if I miss something important? Thank you very much.

I use this kubernetes/contrib ansible script to deploy cluster, and did not change any configuration about flannel.

-- Jeff
kubernetes

1 Answer

7/19/2018

You can use the type:NodePort to access the pod over all of the node's IPs

-- Abdul Jabbar
Source: StackOverflow