How kubernetes external ip multi-pod routing works?
Set externalTrafficPolicy: Local
in the NodePort Service.
This will make it so that traffic going to a node X will only go to the pod in node X. If there is no pod in node X the traffic will be dropped (but this should not be an issue since you're using a DaemonSet).
Another benefit is that this preserves the true source IP that haproxy sees. Without externalTrafficPolicy
, it is possible that haproxy sees the source IP of another node instead of the original one, since nodes can proxy traffic.
More info here