undefinedfix
Sign in

When kubernetes deploys flannel network, how can pod on node connect IP of non cluster host?

vkdgd edited in Thu, 29 Sep 2022

I used kubedm to deploy kubernetes version 1.15 on a single machine, then used flannel to configure the network policy, and then started the deployment of a Java service. The service would access the IP address of a host in the LAN, which was not in the kubernetes cluster. Then I found that the IP address could not be accessed. I pinged the other IP in the LAN, and I couldn't Ping. Then I adjusted the communication mode of flannel to direct routing and host GW, but I still couldn't Ping the LAN IP, and I couldn't Ping the public IP.

To sum up, the internal pod of kubernetes can't access the same LAN host IP of non kubernetes cluster. How to configure it at this time, or similar calico solution to this problem, thank you very much.

The deployment mode of flannel is

wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl apply -f kube-flannel.yml
0 Replies