This article is contributed. See the original author and article here.
Use Case:
To update the existing public ip address to Standard tier in existing service fabric cluster.
Approach:
The below approach helps in modifying the public ip address from basic tier to Standard tier.
To create public IP address and load balancer with standard SKU and attach to existing VMSS and cluster.
Step 1: Run the below command to remove NAT pools.
az vmss update –resource-group “SfResourceGroupName” –name “virtualmachinescalesetname” –remove virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].loadBalancerInboundNatPools |
After the command is executed, it takes time to update each instance of VMSS. Please cross check if the virtual machine scale set instances are in running status before proceeding with next step.
Step 2: Run the below command to delete the NAT pools.
az network lb inbound-nat-pool delete –resource-group “SfResourceGroupName” –lb-name “LB ” –name “LoadBalancerBEAddressNatPool” |
Step 3: Delete Backend pool
az vmss update –resource-group “SfResourceGroupName” –name “virtualmachinescalesetname” –remove virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].loadBalancerBackendAddressPools |
Step 4: Copy the load balancer’s resource file from resources explorer. Delete the load balancer. This can be triggered from portal.
Step 5: Change the Sku of public Ip from ‘Basic’ to ‘Standard’ using the below command.
## Variables for the command ##
$rg = ‘SfResourceGroupName’ $name = ‘LBIP-addressname’ $newsku = ‘Standard’ $pubIP = Get-AzPublicIpAddress -name $name -ResourceGroupName $rg
## This section is only needed if the Basic IP is not already set to Static ##
$pubIP.PublicIpAllocationMethod = ‘Static’ Set-AzPublicIpAddress -PublicIpAddress $pubIP
## This section is for conversion to Standard ##
$pubIP.Sku.Name = $newsku Set-AzPublicIpAddress -PublicIpAddress $pubIP |
Step 6: Create load balancer of Standard Sku. You can modify the load balancer resource file with the below information.
- Load balancer SKU name
"sku": {
"name": "[variables('lbSkuName')]"
},
Please find the template and parameter file attached for reference.
Step 7: Create inbound Nat rules
az vmss update -g ” SfResourceGroupName” -n “virtualmachinescalesetname” –add virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].loadBalancerInboundNatPools “{‘id’:’/subscriptions/{subId}/resourceGroups/{RG}/providers/Microsoft.Network/loadBalancers/{LB} /inboundNatPools/LoadBalancerBEAddressNatPool’}” |
Step 8: Once the NAT rules are created, backend pool can be added from the portal. VMSS and ip address has to be updated.
To add backendpool: Select Backend pools and Click on ‘Add’
Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.
Recent Comments