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
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
Select the downloaded HAProxy load balancer OVA appliance
Select-a-name-and-folder-for-the-HAProxy-VM Install HAProxy in VMware vSphere with Tanzu Kubernetes
Select a name and folder for the HAProxy VM
Select-a-compute-resource-for-HAProxy-appliance Install HAProxy in VMware vSphere with Tanzu Kubernetes
Select a compute resource for HAProxy appliance
Review-the-EULA-for-the-HAProxy-deployment Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
Select a deployment configuration
Select-storage-for-deploying-the-appliance Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
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 Install HAProxy in VMware vSphere with Tanzu Kubernetes
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.

Post a Comment

0 Comments