Preserve source IP address

59 views
Skip to first unread message

Todor Petkov

unread,
Dec 18, 2019, 12:35:31 PM12/18/19
to metallb-users
Hello,

I have the following setup: 3 worker nodes, running metallb, and service exposed via LoadBalancerIP. When I run 'curl $LoadBalancerIP', in the pod itself I see the source IP as the gateway of the pod. I tried to change externalTrafficPolicy to Local, but it's still being NATed. Is there a way to preserve the original source IP address? I read https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip but nothing helps.

Thanks,


David Anderson

unread,
Dec 18, 2019, 12:38:07 PM12/18/19
to Todor Petkov, metallb-users
If you set externalTrafficPolicy: Local, MetalLB itself is doing the
work to make original source IPs work. However, the component that
actually changes or preserves the source IP is not MetalLB, it's
kube-proxy combined with whatever network addon you use. If you set
externalTrafficPolicy=Local and your traffic is still being NATed,
it's a bug in either upstream Kubernetes (kube-proxy), or in your
network addon.

- Dave
> --
> You received this message because you are subscribed to the Google Groups "metallb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to metallb-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/metallb-users/2005b222-fa6a-45d0-bab3-a7ffd28395f8%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages