Configure a Virtual Machine Scale Set with an existing Azure Standard Load Balancer
In this article, you'll learn how to configure a Virtual Machine Scale Set with an existing Azure Load Balancer. With an existing virtual network and standard sku load balancer, you can deploy a Virtual Machine Scale Set with a few clicks in the Azure portal, or with a few lines of code in the Azure CLI or Azure PowerShell using the tabs below.
Prerequisites
- An Azure account with an active subscription. Create an account for free.
-
- An Azure Virtual Network for the Virtual Machine Scale Set and the load balancer.
- An existing standard sku load balancer in the subscription where the Virtual Machine Scale Set will be deployed. Ensure the load balancer has a backend pool.
Sign in to the Azure portal
Sign in to the Azure portal.
Deploy Virtual Machine Scale Set with existing load balancer
In this section, you'll create a Virtual Machine Scale Set in the Azure portal with an existing Azure load balancer.
Note
The following steps assume a virtual network named myVNet and an Azure load balancer named myLoadBalancer has been previously deployed.
On the top left-hand side of the screen, select Create a resource and search for Virtual Machine Scale Set in the marketplace search.
Select Virtual machine scale set and Select Create.
In Create a virtual machine scale set, enter, or select this information in the Basics tab:
Setting Value Project details Subscription Select your Azure subscription Resource Group Select Create new, enter myResourceGroup, then select OK, or select an existing resource group. Scale set details Virtual Machine Scale Set name Enter myVMSS Region Select East US 2 Availability zone Select None Orchestration Orchestration mode Select Uniform Security type Select Standard Scaling Scaling mode Select Manual Instance count Enter 2 Instance details Image Select Ubuntu Server 22.04 LTS Azure Spot instance Select No Size Leave at default Administrator account Authentication type Select SSH public key Username Enter a username for the SSH public key. SSH public key source Select Generate new key pair. SSH key type Select RSA SSH Format. Key pair name Enter a name for the key pair. Select the Networking tab or select Next: Spot > Next: Disks > Next: Networking.
Enter or select this information in the Networking tab:
Setting Value Virtual Network Configuration Virtual network Select myVNet or your existing virtual network. Load balancing Load balancing options Select Azure load balancer Select a load balancer Select myLoadBalancer or your existing load balancer Select a backend pool Select myBackendPool or your existing backend pool. Select the Management tab.
In the Management tab, set Boot diagnostics to Off.
Select the blue Review + create button.
Review the settings and select the Create button.