Replies: 1 comment 4 replies
-
ServiceLB is not aware of interfaces or anything else. All the pods do is bind to ports on the host (not to any specific address or interface), and forward traffic from there to the service address and ports. The service controller itself advertises the IPs of the Kubernetes nodes. If you want to use a different IP, you can override the node-ip or node-external-ip - but this will just change what shows up as the LoadBalancer IP, it won't actually change how anything listens. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, as many before I have difficulties getting the real "client IP" in my pods receiving HTTP traffic. The only specifics of my setup is that my nodes are talking to each other over a pre-existing tailscale network. Everything except this "source client IP" works well.
I am well aware of
externalTrafficPolicy: Local
, which works well if I don't have a cluster communicating over Tailscale. I am also aware of the native k3s integration with Tailscale, I'd rather not use it as the machine is using the Tailscale network for unrelated stuff.My install line is:
Resulting in:
The resulting problem is that the built-in Service LB is handing the built-in Traefik service the "wrong IP":
Which then results in my downstream pods receiving:
"x-forwarded-for":"10.42.0.11, 10.42.0.8"
instead of the real client IP.I'm guessing if I could tell Service LB to hand over my "real public IP" instead of the Tailscale internal one it would improve the situation. Except setting the External IP directly on the nodes is causing other issues.
Is there a way to tell Service LB which IP/interface to use and not have it select the internal one?
(I am using the last version of k3s)
Beta Was this translation helpful? Give feedback.
All reactions