By zseguin
Hello,
I deployed Traefik to my Kubernetes cluster to act as an Ingress controller. On other clouds (e.g., Azure), you can set ‘External Traffic Policy’ to ‘Local’ in order to preserve the client source IP (https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip).
Does Digital Ocean plan on supporting this feature?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Ditto; I’m toying with the idea of some non-HTTP apps that require client IP address information. Something like PROXY protocol would work in at least one case, but it would be simpler to have direct IP-level access to the client address.
Hi there,
Getting the client IP should be possible with
externalTrafficPolicy: Local
and enabling proxy protocol through the service annotations:
https://www.digitalocean.com/docs/kubernetes/how-to/configure-load-balancers/
Regards,
John Kwiatkoski Senior Developer Support Engineer - Kubernetes
Digging more into it:
IIUC, this means that DO k8s load balancer doesn’t support the client source IP, as it uses the proxy (option 1) described in the link above. Moreover, the load balancer setting doesn’t seem to stick, so the HTTP headers solution isn’t feasible, and if you have a TCP service you have no support.
Correct me if I am wrong, but currently the source IP will be set to one of the nodes and there is no way to change that.
Ideally, DO should implement the option 2 (packet forwarder), as it would support this use case for people that need it (GCP and Azure do implement it).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.