Edit

Share via


Upgrading from Basic Load Balancer on AKS (preview)

Important

On September 30, 2025, Basic Load Balancer will be retired. For more information, see the official announcement. If you are currently using Basic Load Balancer, make sure to upgrade to Standard Load Balancer prior to the retirement date to avoid a forced migration and unscheduled downtime. This article will help guide you through the upgrade process.

In this article, we discuss AKS-specific guidance for upgrading your Basic Load Balancer instances to Standard Load Balancer. Standard Load Balancer is recommended for all production instances and provides many key differences to your infrastructure. For guidance on upgrading your Basic Load Balancer instances to Standard Load Balancer, see the official guidance for Basic load balancer upgrade

Note

For clusters using both Availability Sets and the Basic Load Balancer, there is a separate script that must be used that will perform both migrations at once (Availability Sets to Virtual Machine node pools, and Basic Load Balancer to Standard Load Balancer). For steps on performing this migration, see the guidance for Availability Sets migration.

Before You Begin

Important

Downtime occurs during migration. We recommend you test the migration in a development or test environment before trying it out with a production cluster. This process will also migrate your Basic IP to a Standard IP, while keeping the inbound IP addresses associated with the load balancer the same. New public IPs will be created and associated to the Standard Load Balancer outbound rules to serve cluster egress traffic.

Requirements

Preparing for Migration

  • Create a migration plan for planned downtime.
  • Once the migration is started, roll back is not allowed.

Install the aks-preview CLI extension

Important

AKS preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. AKS previews are partially covered by customer support on a best-effort basis. As such, these features aren't meant for production use. For more information, see the following support articles:

  1. Install the aks-preview CLI extension using the az extension add command.

    az extension add --name aks-preview
    
  2. Update the extension to ensure you have the latest version installed using the az extension update command.

    az extension update --name aks-preview
    

Register the BasicLBMigrationToStandardLBPreview feature flag

  1. Register the BasicLBMigrationToStandardLBPreview feature flag using the az feature register command.

    az feature register --namespace "Microsoft.ContainerService" --name "BasicLBMigrationToStandardLBPreview"
    

    It takes a few minutes for the status to show Registered.

  2. Verify the registration status using the az feature show command.

    az feature show --namespace "Microsoft.ContainerService" --name "BasicLBMigrationToStandardLBPreview"
    
  3. When the status reflects Registered, refresh the registration of the Microsoft.ContainerService resource provider using the az provider register command.

    az provider register --namespace Microsoft.ContainerService
    

Run Command to Upgrade Basic load Balancer to Standard

  1. The following command initiates a script to upgrade your Basic load balancer to Standard using the az aks update command, and setting --load-balancer-sku to Stanadard and enabling the preview feature flag BasicLBMigrationToStandardPreview.
az aks update \
    --name $clusterName \
    --resource-group $resourceGroup \
    --load-balancer-sku=Standard 
  1. Verify that the migration was successful using the az aks show command, and confirm the load-balancer type is set to Standard:
az aks show \
    --name $clusterName \
    --resource-group $resourceGroup
  1. Verify that all pods and services are running successfully using the kubectl get pods and kubectl get svc commands:
  kubectl get svc -A \
  kubectl get pods -A
  1. You can confirm the new IP addresses associated with outbound rules by listing the outbound IP addresses. This is done by confirming the Resource IDs for the IP addresses, then listing the IP addresses.

Use the following command to get the Resource ID for the outbound IP addresses:

  # Get the outbound IP Resource ID
  az aks show -g <myResourceGroup> -n <myAKSCluster> --query networkProfile.loadBalancerProfile.effectiveOutboundIPs[].id

Use the following command to get each IP address for the Resource ID:

  # get the new IP for each IP Resource ID
  az network public-ip show --ids <IPResourceID> --query ipAddress -o tsv