Can I Use HAProxy as an External Load Balancer for Kubernetes?

0
26
Asked By TechieTraveler42 On

I'm currently using an HAProxy load balancer that I've had for a long time in my production setup. Now, I've got a Kubernetes cluster with three services, and I'm looking to add load balancing for these services. My question is, can I utilize this existing HAProxy server, which is located outside the Kubernetes cluster, to balance the load for my Kubernetes services? I've come across some information, but I'm not entirely sure how it would work without making significant changes to my current HAProxy configuration.

4 Answers

Answered By HAProxyExpert On

Definitely! We've built this feature for customers who need to use BGP with an HAProxy setup outside of Kubernetes. You can define your HAProxy configuration, and the Ingress Controller will manage the updates accordingly. If you're looking for a more controlled approach, consider using our CRDs for these externally managed resources, perhaps in a gitOps style. It keeps things organized!

InterestedUser97 -

That sounds great! Do you have any additional resources or links about that? I’d love to learn more on how to implement it.

Answered By K8sWhisperer On

Yes, I’ve done this with OpenShift 3.x too. It worked well in several setups, including OpenStack and bare metal clusters. However, I’d recommend having some type of internal load balancer or ingress service within your kube setup to make provisioning easier later on.

Answered By BalanceMaster101 On

The easiest method would be to use NodePort services in Kubernetes for your ingress and direct traffic to your HAProxy on all your worker nodes. This way, you can control traffic effectively while keeping your setup straightforward.

Answered By CloudGuru88 On

Absolutely! If you're running Kubernetes on something like OpenStack using the Amphora provider for Load Balancer as a Service, they typically rely on similar setups. Since your HAProxy is external, it can definitely work to balance the traffic.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.