Unable to delete AKS load balancer where VMSS is already deleted

Chi Sang Hui 0 Reputation points
2025-03-10T04:18:20.7166667+00:00

Hi team,

I cannot delete the "kuebernetes" load balancer from my deleted AKS clusters.
I also cannot delete the backpools.

I don't have any support plan so I cant file a ticket. Can I get some support to delete the resource please. I am still being charged.

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.
2,311 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Geethasri.V 30 Reputation points Microsoft External Staff
    2025-03-11T18:06:25.59+00:00

    Hi Chi Sang Hui,

    This issue occurs when an Azure Kubernetes Service (AKS) cluster is deleted, but the associated Azure Load Balancer ("kubernetes") and backend pools remain in the resource group. This is often due to orphaned network interfaces (NICs) or lingering dependencies.

    Steps to resolve:

    Check and delete orphaned NICs

    The load balancer might still be associated with orphaned NICs from the deleted Virtual Machine Scale Set (VMSS). Run the following command to list NICs in the resource group:

    az network nic list --resource-group <RESOURCE_GROUP_NAME> --query "[].id" -o tsv

    If any NICs exist, delete them:

    az network nic delete --ids <NIC_ID>

    Remove backend pools manually

    If the backend pools are still associated with deleted VMSS instances, remove them manually:

    az network lb address-pool list --resource-group <RESOURCE_GROUP_NAME> --lb-name kubernetes

    If any backend pools exist, delete them:

    az network lb address-pool delete --resource-group <RESOURCE_GROUP_NAME> --lb-name kubernetes --name <POOL_NAME>

    Delete the load balancer Once dependencies are removed, delete the load balancer:

    az network lb delete --resource-group <RESOURCE_GROUP_NAME> --name kubernetes

    Check for other dependencies

    Verify if any public IPs, managed identities, or NSGs related to the AKS cluster remain in the resource group and delete them. 

    If it was helpful, please click "Upvote" on this post to let us know.

    Thank You.

    0 comments No comments

  2. Chi Sang Hui 0 Reputation points
    2025-03-13T18:13:57.74+00:00

    Hi Geethasri,

    Thank you for the answer.

    1. I dont have any NICs remaining in the resource group and the result is empty when running
      az network nic list
    2. There are 2 backend pools in the kubernetes lb but when I tried to delete them it errors with Failed to delete load balancer backend pool 'kubernetes'. Error: Cannot remove backend address pool kubernetes from load balancer since it is in use by virtual machine scale set /subscriptions/xxx. Where the vmss is obviously deleted already.

    User's image

    Attached are the only remaining resources in the resource group.

    I believe there are some dangling resource relationships that needs Microsoft team to resolve, can I get permission to open an one-off ticket?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.