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
kubectl apply -f kube-flannel.yml