Hi, I have a k8s cluster with 3 nodes and a load balancer with an ingress IP address. I want to give my customers an IP address they can use to verify requests from my server.
However, I realized that the IPs set in the X-Forwared-For header are the IPs of the Nodes (VMs). Is it possible to have an IP that isn’t associated with the nodes because if I add another node to my node pool, or a completely new node pool, I’d need to give my customers the IPs of those new nodes again.
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!
One viable solution could be utilizing a Load Balancer.
The Load Balancer’s static IP address can be the unifying point between your customers and multiple backend nodes. As you scale your infrastructure by adding more nodes, the load balancer efficiently routes traffic to these nodes without changing the IP your customers interact with.
However, it’s key to note that the X-Forwarded-For header will still send the originating IP address of a client connecting to the server. To change this, you might need to consider implementing custom configurations, possibly tweaking your application or ingress controller to accomplish this.
Hope that this helps!
Hi there,
Quick update here, DigitalOcean have just released a managed component for maintaining host routes in DOKS:
https://www.digitalocean.com/blog/introducing-doks-routing-agent
The new DOKS routing agent is a managed component for configuring static routes on Kubernetes worker nodes. It is a direct response to user feedback on its predecessor, the static route operator, and introduces new features to enhance routing flexibility. Despite being a managed component, the DOKS routing agent is included at no additional cost for users.
- Bobby
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.