r/openstack • u/greenFox99 • Jun 30 '25
Openstack L2 Loadbalancer
Edit: That's not L2 LB, but just LB with members of the pool being able to access the source IP from the regular IP header.
Hello!
I setup Kubernetes in an openstack public cloud. Everything goes well, until I try to setup an ingress controller (nginx).
The thing is, I have multiple nodes that can answer all HTTPS requests. So I guess that's good to have a loadbalancer with a floating IP in front of it. However Octavia doesn't seem to support loadbalacing without unwrapping a packet and rewrap it to the endpoint. That technically works, but all HTTP requests come from Octavia's IP, so I can't filter the content based on my office public IP.
I could use Octavia as a reverse proxy, however that means I have to manage certificates in Kubernetes and Octavia in parallel, and I would like to avoid spreading certificates everywhere.
I could also setup a small VM with failover that acts as an L2 loadbalancer (just doesn't change source IP).
And for security purpose, I don't want my Kubernetes cluster to call openstack's API.
I setup MetalLB, which is nice but only support failover since I don't have BGP peers.
I found this nice doc, but it didn't help me: https://docs.openstack.org/octavia/rocky/user/guides/basic-cookbook.html
So I was wondering if some people here know a way to do L2 load balancing or just loadbalacing without modifying the source IP?
Thank you
View all comments
Show parent comment
1
u/greenFox99 Jun 30 '25 edited Jun 30 '25
I might have not been clear, sorry. The thing is, I want my Kubernetes to be independent from my Openstack project and not to use the API or depend on Octavia to manage TLS certificates. I think this is a network issue that is not specifically related to Kubernetes, but to openstack because there are probably other cases where people need L2 LB.
And yes, it is fine and other providers do it this way too, but that's not a design I am willing to setup. I try to stay vendor neutral in my implementations, thus asking for a loadbalancer solution that is not a reverse proxy. The solution of using the openstack manager in Kubernetes seems like a specific bypass rather than an actual solution to loadbalancing.
Maybe I'm crazy expecting my application (Kubernetes) to be independent and not managing my infrastructure (Openstack). And I really think that's a better design to decouple the application and the infrastructure, until proven wrong, even if that's more complicated and not what people do.
But I really appreciate your effort trying to help me find a solution, thank you :)