I'm doing a few tests using 2 pods with 1 service for named pod-1 with the following setup:
kind-control-plane 172.18.0.3
kind-worker 172.18.0.4
x-40043 pod-1 10.244.0.11 kind-control-plane
x-40043 pod-2 10.244.2.9 kind-worker
If pod-1 (where the server is listening) hits
172.18.0.4:30720 the hop DOES NOT forward to 172.18.0.3 as expected, and the packet is marked as a drop. This is the iptables rule:
4 240 KUBE-MARK-DROP all -- any any anywhere anywhere /* x-40043/s-x-40043-pod-1:service-port-tcp-80 has no local endpoints */
The issue here comes when the hairpin connects on the high port, for this case pod-2 accessing
172.18.0.4:30720, ends up using the pod IP and being forwarded to the correct service.
1 60 KUBE-SVC-CHGKFLJR7MW3FVQV all -- any any
10.244.0.0/16 anywhere /* Redirect pods trying to reach external loadbalancer VIP to clusterIP */
This does not happen on IPVS mode (all blocked) though. Should the network model allow traffic for internal cases?
--