delete aks Loadbalancer not possible

Manuel 0 Reputation points
2023-10-04T07:52:36.6833333+00:00

Hi,

I am desperately trying to delete a load balancer. It was connected to an AKS cluster which no longer exists.

When I try to delete it, I get the following error message:

Failed to delete load balancer 'kubernetes'. Error: Cannot delete load balancer MC_thankfuldune-c1515963-rg_thankfuldune-c1515963_westeurope/providers/Microsoft.Network/loadBalancers/kubernetes'>kubernetes since its child resources kubernetes,aksOutboundBackendPool,gfadgad are in use by virtual machine scale set /subscriptions/xxxx-xxxx/resourceGroups/MC_thankfuldune-c1515963-rg_thankfuldune-c1515963_westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/aks-systempool-27307886-vmss.

However, the reported vmss no longer exists.

Does anyone have an idea how to get rid of the load balancer? Deleting the entire RG did not work either.

thanks

Manuel

PS. I cannot delete the backend pools. Because according to the error message, they are used by the machine scale set, which no longer exists.

Failed to delete load balancer backend pool Failed to delete load balancer backend pool 'aksOutboundBackendPool'. Error: Cannot remove backend address pool aksOutboundBackendPool from load balancer since it is in use by virtual machine scale set /subscriptions/xxxx-xxxx/resourceGroups/MC_thankfuldune-c1515963-rg_thankfuldune-c1515963_westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/aks-systempool-27307886-vmss.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,865 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
404 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
348 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. AlaaBarqawi_MSFT 782 Reputation points Microsoft Employee
    2023-10-15T08:56:18.8833333+00:00

    Hi @Manuel please do the following

    Remove load balancer associated with the VMSS:
    az vmss update --resource-group <<RESOURCE_GROUP_NAME>> --name <<VMSS_NAME>> --remove virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].loadBalancerBackendAddressPools 0

    Upgrade instances in the VMSS:
    az vmss update-instances --instance-ids "*" -n <<VMSS_NAME>> -g <<RESOURCE_GROUP_NAME>>

    Remove the load balancer:
    az network lb delete -g <<RESOURCE_GROUP_NAME>> -n <<LB_NAME>>

    I had success with this steps.