K8s MasterNode can't curl or ping pod in WorkerNode but WorkerNode Can

6/7/2019

I'm setting up k8s HA. I have 2 K8s MasterNode and 3 K8s Workernode using Flannel as CNI. I try to install glusterfs and heketi and found out that i can't curl to any pod in my WorkerNode(Use masternode01 to Control Cluster). The error said Connection Time Out. Anywhere that i can check the problem?

I try to exec in to my test pod and curl from that pod. It can curl with result. then i try curl by use every workernode. It can curl. Only MasterNode(MasterNode01 and MasterNode02) can't curl , ping or telnet to any pod in workernode.

-- Peeradis Sa-nguanTrakul
flannel
kubernetes

1 Answer

6/10/2019

So I Found out that it about iptables.

sudo iptables --flush
sudo iptables -tnat --flush
sudo systemctl restart docker

I ran this command on my masternode and now it work fine.

-- Peeradis Sa-nguanTrakul
Source: StackOverflow