Hi @Irvin.Lee ,
Thanks for contacting Microsoft Q&A.
The error message you've received indicates that you cannot delete the Load Balancer because it is still in use by a Virtual Machine Scale Set (VMSS). This is expected behavior, as Azure prevents the deletion of resources that are actively being used by other resources to avoid disrupting active workloads. To delete the Load Balancer, you'll first need to disassociate it from the VMSS. Here's how you can proceed:
To disassociate the Load Balancer from the VMSS, follow these steps:
· Go to the Azure portal.
· Navigate to the Load Balancer resource (lb-V1ES-338502) in your Resource Group.
· Look for the "Backend pools" section and select the backend pool associated with the VMSS (bepool).
· In the backend pool configuration, remove the association with the VMSS. This effectively disassociates the Load Balancer from the VMSS.
· Save your changes.
Delete the Load Balancer: After disassociating the Load Balancer from the VMSS, you should be able to delete the Load Balancer without encountering the "LoadBalancerInUseByVirtualMachineScaleSet" error:
· Go back to the Load Balancer resource in the Azure portal.
· Click on the Load Balancer and look for the "Delete" button in the top menu.
· Click it to initiate the deletion process.
· Follow the on-screen prompts to confirm and delete the Load Balancer.