NodePort service does not redirect request to another node

6/18/2019

So I ve an on prem kubernetes cluster with two nodes. I use flannel as cidr.

The problem occurs when I deploy an app and the pod lands on the worker node and I try to access the service using master node ip and service port. Cluster ip is the same as the master node IP. It does not redirect the request to the worker node. I know the app works because it shows me the result when I curl the worker node IP.

What can I do to debug and solve this problem ? Or NodePort is not the thing I need ?

-- Mightee
kubernetes
kubernetes-cluster
kubernetes-service

1 Answer

6/19/2019

It seemed like flannel was not connecting to the network. Instead of debugging, i ran kubeadm reset and deleted all iptables,. Ip links and re init with kubeadm. It did work this time. Dns is also working. Weird

-- Mightee
Source: StackOverflow