Create and use load balancer with Azure Kubernetes Service in AKS enabled by Azure Arc

Applies to: AKS on Azure Stack HCI 22H2, AKS on Windows Server

This article details how to configure HAProxy as your load balancer for a workload cluster in AKS Arc. For custom load balancer integration, see Create and use a custom load balancer.

In AKS enabled by Azure Arc, the load balancer is deployed as a virtual machine (VM) running Linux and HAProxy + KeepAlive to provide load balanced services for the workload clusters. AKS load balances requests to the Kubernetes API server, and manages traffic to application services.

Before you begin

  • Install AKS Arc, and provide a range of virtual IP addresses for the load balancer during the network configuration step.
  • Make sure you have enough memory and storage to create a new virtual machine and have virtual IP addresses to assign to application services.

Configure load balancer

To configure a load balancer, use New-AksHciCluster to provision a new cluster as shown in the following example:

New-AksHciCluster -name mycluster -loadBalancerVmSize Standard_A4_v2

This example creates a new workload cluster with a load balancer deployed as a virtual machine running HAProxy to manage traffic for your applications.

Next steps