Administrative State (Admin State) is a feature of Azure Load Balancer that allows you to override the Load Balancer’s health probe behavior on a per backend pool instance basis. There are three types of admin state values: Up, Down, None.
You can use the Azure portal, Azure PowerShell, or Azure CLI to manage the admin state for a backend pool instance. Each section provides instructions for each method with examples for setting, updating, or removing an admin state configuration.
Prerequisites
- Access to the Azure portal.
- An Azure account with an active subscription. Create an account for free
- An existing resource group for all resources.
- Two or more existing Virtual Machines.
- An existing standard load balancer in the same subscription and virtual network as the virtual machines.
- The load balancer should have a backend pool with health probes and load balancing rules attached.
- Access to the Azure portal.
- An Azure account with an active subscription. Create an account for free
- An existing resource group for all resources.
- Existing Virtual Machines.
- An existing standard load balancer in the same subscription and virtual network as the virtual machine.
- The load balancer should have a backend pool with health probes and load balancing rules attached.
- Access to the Azure portal.
- An Azure account with an active subscription. Create an account for free
- An existing resource group for all resources.
- Existing Virtual Machines.
- An existing standard load balancer in the same subscription and virtual network as the virtual machine.
- The load balancer should have a backend pool with health probes and load balancing rules attached.
Set admin state on a new backend pool instance
In this section, you learn how to set an admin state to Up or Down as part of a new backend pool create.
- Sign in to the Azure portal.
- In the search box at the top of the portal, enter Load balancer. Select Load balancers in the search results.
- Select your load balancer from the list.
- In your load balancer's page, select Backend pools under Settings.
- Select + Add in Backend pools to add a new backend pool.
- In the Add backend pool window, enter or select the following information:
Setting |
Value |
Name |
Enter myBackendpool . |
Backend Pool Configuration |
Select IP Address. |
IP addresses |
|
Backend Address Name |
Enter the name of your backend address. |
IP Address |
Select the IP address to be added to the backend pool. |
- Select Save.
- In your Backend pools page, select the corresponding Admin State value of your recently added backend pool instance.
- In your Admin state details window, select Down from the dropdown menu.
- Select Save.
Connect to your Azure subscription with Azure PowerShell.
Create a new backend pool with a backend pool instance while setting the admin state value to UP or DOWN with New-AzLoadBalancerBackendAddressConfig
. Replace the values in brackets with the names of the resources in your configuration.
$rsg = <resource-group>
$vnt = <virtual-network-name>
$lbn = <load-balancer-name>
$bep = <backend-pool-name>
$ip = <ip-address>
$ben = <backend-address-name>
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “DOWN”
$lb | New-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
This example sets a new backend pool instance admin state to DOWN with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
$rsg = "MyResourceGroup"
$vnt = "MyVnet"
$lbn = "MyLB"
$bep = "MyAddressPool"
$ip = "10.0.2.4"
$ben = "MyBackend"
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “DOWN”
$lb | New-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
Connect to your Azure subscription with Azure CLI.
Create a new backend pool with a backend pool instance while setting admin state value to UP or DOWN with az network lb address-pool create. Replace the values in brackets with the names of the resources in your configuration.
az network lb address-pool create \
-g <resource-group> \
--lb-name <lb-name> \
-n <lb-backend-pool-name> \
--vnet <virtual-network-name> \
--backend-address “{name: <new-lb-backend-pool-address-name>,ip-address:<new-lb-backend-pool-address>}” \
--admin-state <admin-state-value>
This example updates a backend pool instance admin state to DOWN with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
az network lb address-pool create \
-g MyResourceGroup \
--lb-name MyLb \
-n MyAddressPool \
--vnet MyVnet \
--backend-address “{name: MyBackend,ip-address:10.0.2.4}” \
--admin-state DOWN
Set admin state as part of new backend pool instance after creation
In this section, you learn how to set an admin state to Up or Down as part of a new backend pool instance add.
Sign in to the Azure portal.
In the search box at the top of the portal, enter Load balancer and select Load balancers in the search results.
On the load balancer's Overview page, select your load balancer from the list.
In your load balancer's page, select Backend pools under Settings.
Select your backend pool.
In your backend pool's page, select + Add under IP configurations.
Note
This step is assuming your backend pool is NIC-based.
Select the virtual machine you want to add to the backend pool.
Select Add and Save.
In your Backend pools page, select the corresponding Admin State value of your recently added backend pool instance.
In your Admin state details window, select Up from the dropdown menu.
Select Save.
Connect to your Azure subscription with Azure PowerShell.
Add a new backend pool instance with the admin state value configured to UP or DOWN with New-AzLoadBalancerBackendAddressConfig. Replace the values in brackets with the names of the resources in your configuration.
$rsg = <resource-group>
$vnt = <virtual-network-name>
$lbn = <load-balancer-name>
$bep = <backend-pool-name>
$ip = <ip-address>
$ben = <backend-address-name>
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “UP”
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
This example sets a new backend pool instance admin state to UP with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
# Set the values for the variables
$rsg = "MyResourceGroup"
$vnt = "MyVnet"
$lbn = "MyLB"
$bep = "MyAddressPool"
$ip = "10.0.2.4"
$ben = "MyBackend"
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “UP”
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
Connect to your Azure subscription with Azure CLI.
Add a new backend pool instance with the admin state value is configured. The value can be set to UP or DOWN with az network lb address-pool update . Replace the values in brackets with the names of the resources in your configuration.
az network lb address-pool update \
-g <resource-group> \
--lb-name <lb-name> \
-n <lb-backend-pool-name> \
--vnet <virtual-network-name> \
--backend-address “{name: <new-lb-backend-pool-address-name>,ip-address:<new-lb-backend-pool-address>}” |
--admin-state <admin-state-value>
This example sets a new backend pool instance admin state to UP with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
az network lb address-pool update \
-g MyResourceGroup \
--lb-name MyLb \
-n MyAddressPool \
--vnet MyVnet \
--backend-address “{name: MyBackend,ip-address:10.0.2.4}” |
--admin-state UP
Update admin state on existing backend pool instance
In this section, you learn how to update an existing admin state from existing backend pool instance by setting the value to Up or Down.
- Sign in to the Azure portal.
- In the search box at the top of the portal, enter Load balancer and select Load balancers in the search results.
- Select your load balancer from the list.
- In your load balancer's page, select Backend pools under Settings.
- In your Backend pools page, select the corresponding Admin State value of your recently added backend pool instance.
- In your Admin state details window, select Up from the dropdown menu.
- Select Save.
Connect to your Azure subscription with Azure PowerShell.
Update an existing backend pool instance with the admin state value configured to UP or DOWN with New-AzLoadBalancerBackendAddressConfig. Replace the values in brackets with the names of the resources in your configuration.
# Set the values for the variables
$rsg = <resource-group>
$vnt = <virtual-network-name>
$lbn = <load-balancer-name>
$bep = <backend-pool-name>
$ip = <ip-address>
$ben = <backend-address-name>
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “DOWN”
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
This example sets an existing backend pool instance admin state to DOWN with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
$rsg = "MyResourceGroup"
$vnt = "MyVnet"
$lbn = "MyLB"
$bep = "MyAddressPool"
$ip = "10.0.2.4"
$ben = "MyBackend"
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “DOWN”
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
Connect to your Azure subscription with Azure CLI.
Update an existing backend pool instance, and configure the admin state value to UP or DOWN with az network lb address-pool update. Replace the values in brackets with the names of the resources in your configuration.
az network lb address-pool update \
-g <resource-group> \
--lb-name <lb-name> \
-n <lb-backend-pool-name> \
--backend-address “{name: <lb-backend-pool-address-name>,ip-address:<lb-backend-pool-address>}” |
--admin-state <admin-state-value>
This example updates an existing backend pool instance admin state to DOWN with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
az network lb address-pool update \
-g MyResourceGroup \
--lb-name MyLb \
-n MyAddressPool \
--backend-address “{name: MyBackend,ip-address:10.0.2.4}” |
--admin-state DOWN
Removing admin state from existing backend pool instance
In this section, you learn how to remove an existing admin state from an existing backend pool instance. This is done by setting the admin state value to None.
- Sign in to the Azure portal.
- In the search box at the top of the portal, enter Load balancer and select Load balancers in the search results.
- Select your load balancer from the list.
- In your load balancer's page, select Backend pools under Settings.
- Select the corresponding Admin State value of your backend pool instance that you would like to remove.
- In your admin state’s window, select None from the dropdown menu.
- Select Save.
Connect to your Azure subscription with Azure PowerShell.
Remove an existing backend pool instance. This is done by setting the admin state value to NONE with New-AzLoadBalancerBackendAddressConfig. Replace the values in brackets with the names of the resources in your configuration.
# Set the values for the variables
$rsg = <resource-group>
$vnt = <virtual-network-name>
$lbn = <load-balancer-name>
$bep = <backend-pool-name>
$ip = <ip-address>
$ben = <backend-address-name>
# Remove the admin state from the backend pool instance
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “NONE”
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
This example removes an existing backend pool instance admin state with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
# Set the values for the variables
$rsg = "MyResourceGroup"
$vnt = "MyVnet"
$lbn = "MyLB"
$bep = "MyAddressPool"
$ip = “10.0.2.4"
# Remove the admin state from the backend pool instance
$vnet = Get-AzVirtualNetwork -Name $vnt -ResourceGroupName $rsg
$lb = Get-AzLoadBalancer -ResourceGroupName $rsg -Name $lbn
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress $ip -Name $ben -VirtualNetworkId $vnet.Id -AdminState “NONE”
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ip1 -Name $bep
- Connect to your Azure subscription with Azure CLI.
- Remove an existing backend pool instance by setting the admin state value to None with az network lb address-pool update. Replace the values in brackets with the names of the resources in your configuration.
# Remove the admin state from the backend pool instance
az network lb address-pool update \
-g <resource-group> \
--lb-name <lb-name> \
-n <lb-backend-pool-name> \
--backend-address “{name: <lb-backend-pool-address-name>,ip-address:<lb-backend-pool-address>}” |
--admin-state <admin-state-value>
- This example removes an existing backend pool instance admin state with the following defined values:
Setting |
Placeholder Value |
Example Value |
Resource group |
<resource-group> |
MyResourceGroup |
Virtual network |
<virtual-network-name> |
MyVnet |
Load balancer |
<load-balancer-name> |
MyLb |
Backend pool name |
<backend-pool-name> |
MyAddressPool |
Backend pool instance IP address |
<ip-address> |
10.0.2.4 |
Backend pool instance name |
<backend-address-name> |
mybackend |
az network lb address-pool update \
-g MyResourceGroup \
--lb-name MyLb \
-n MyAddressPool \
--backend-address "{name: MyBackend,ip-address:10.0.2.4}" \
--admin-state NONE
Next Steps