Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- The minimum Kubernetes version for this script is 1.27. If you need to upgrade your AKS cluster, see Upgrade an AKS cluster.
- You need the Azure CLI installed. Minimum version 2.72.0
- Install the
aks-preview
Azure CLI extension. Minimum version 0.5.170. - If the cluster is running Key Management Service with private key vault, this must be disabled for the duration of the migration
- If the cluster is using any ValidatingAdmissionWebhooks or MutatingAdmissionWebhooks, these must be disabled for the duration of the migration.
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:
Install the
aks-preview
CLI extension using theaz extension add
command.az extension add --name aks-preview
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
Register the
BasicLBMigrationToStandardLBPreview
feature flag using theaz feature register
command.az feature register --namespace "Microsoft.ContainerService" --name "BasicLBMigrationToStandardLBPreview"
It takes a few minutes for the status to show Registered.
Verify the registration status using the
az feature show
command.az feature show --namespace "Microsoft.ContainerService" --name "BasicLBMigrationToStandardLBPreview"
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
- 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
toStanadard
and enabling the preview feature flagBasicLBMigrationToStandardPreview
.
az aks update \
--name $clusterName \
--resource-group $resourceGroup \
--load-balancer-sku=Standard
- 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
- Verify that all pods and services are running successfully using the
kubectl get pods
andkubectl get svc
commands:
kubectl get svc -A \
kubectl get pods -A
- 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
Related content
Azure Kubernetes Service