Install HAProxy in VMware vSphere with Tanzu Kubernetes

With VMware vSphere 7.0 U1, VMware made a great new announcement around Tanzu Kubernetes. Previously, you had to use VMware Cloud Foundation to really make use of Tanzu Kubernetes along with VMware NSX-T. However, with VMware vSphere with Tanzu Kubernetes, VMware unlocked this functionality for “normal” vSphere running the vSphere Distributed Switch (vDS) as part of the “bring your own infrastructure” approach to Tanzu with 7.0 U1. Part of the requirement with vSphere with Tanzu is bringing your own load balancer. An available option is the HAProxy appliance, one of the first third-party load balancing partners working with VMware the networking side of things for Tanzu. This post will take a closer look at how to install HAProxy in VMware vSphere with Tanzu Kubernetes.

vSphere with Tanzu Bring Your Own Infrastructure

Whereas VMware Cloud Foundation (VCF) is the holistic, complete infrastructure stack solution from VMware providing all of the necessary components including compute, storage, and networking, vSphere with Tanzu allows bringing your own solutions to the table.

As part of that, you can bring your own networking. Customers can now choose to use existing networking infrastructure with the very popular vSphere Distributed Switch (vDS) or NSX-T (available in VCF). Closely connected with the bring your own network is the “bring your own load balancer.” You can now choose your L4 load balancer you want to use with Tanzu Kubernetes clusters.

What is the HAProxy?

With the “bring your own load balancer” approach, the first load balancing solution that has been provided by a VMware partner is the HAProxy. HAProxy is a software load balancer & application delivery controller that provides load balancing capabilities for vSphere with Tanzu Kubernetes.

Check out more information directly from the HAProxy website here:

HAProxy for VMware vSphere with Tanzu Kubernetes

Install HAProxy in VMware vSphere with Tanzu Kubernetes

Now that we have a brief overview of the HAProxy appliance that can be used with vSphere with Tanzu Kubernetes, let’s see how we can deploy the appliance that is required for use with vSphere with Tanzu when you work through the Workload Management wizard.

Below is an overview of the Workload Management: Network Topology when using vSphere with Tanzu Kubernetes. AS you can see the Load Balancer below in the network diagram is where the HAProxy will run.

Workload Management Network Topology using HAProxy in vSphere with Tanzu

Before deploying the HAProxy appliance, you will need to download the latest version. The latest version at the time of this writing can be found here:

The appliance is around 550 MB. Once you have the OVA, simply go through the standard OVA deployment wizard in the vSphere Client.

Select the downloaded HAProxy load balancer OVA appliance
Select a name and folder for the HAProxy VM
Select a compute resource for HAProxy appliance
Review the EULA for the HAProxy deployment

Here, I am choosing the Default configuration. This is the configuration that deploys the appliance with 2 nics: a management network (Supervisor – > HAProxy dataplane) and a single Workload network. Load-balanced IPs are assigned on the Workload network. NOTE: Deployment will ignore all “frontend” options.

Select a deployment configuration
Select storage for deploying the appliance

With the Default configuration, the Frontend network is really just ignored.

Select a destination network for the load balancer interfaces

Step 9 has several settings here that you want to pay attention to. There are many network settings and IP address configurations that you want to make sure you have mapped out before you get to the point of deploying your HAProxy. These include your management IP and workload IP.

The management IP is generally the public management network that is used to manage the HAProxy appliance. Workload IP is where the Worker VMs will reside.

Customize the HAProxy VM template part 2

Configuring the load balancing IPs along with frontend IP.

Customize the HAProxy VM template part 2 of config

Ready to complete the deployment of the HAProxy VM appliance.

Ready to complete the HAProxy VM deployment

The HAProxy VM appliance is deployed successfully and after powering on will be ready to be used for Workload Management. In the Workload Management wizard, you will point to the HAProxy appliance for the load balancer portion of the configuration.

HAProxy VM deployed successfully for vSphere with Tanzu

Wrapping Up

The process to Install HAProxy in VMware vSphere with Tanzu Kubernetes is straightforward. It allows you to bring your own network as well as bring your own load balancer to the Tanzu Kubernetes configuration in building out your Tanzu environment. Stay tuned for Workload management deployment in the home lab using the HAProxy VM appliance that we spun up using the process.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

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