delete aks resource group is blocked by loadBalancer in arm resource group

Admin CDW 21 Reputation points
2022-12-16T08:40:34.363+00:00

I try to delete a resource group in which I have an aks service. azure generated a new resource group to handle Vnet and Public IP. the Vnet is attached to a loadBalancer that is not in my resource group but armrg kind of. So i cnat detached the load balancer from the vnet and it's blocking the deletion of my resource group.

To come to this state i tryed to delete the resource group a first time, the applicaition gateway was delete but then the deletion failed.

How can i delete this?

Thanks

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,670 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,149 questions
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,321 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Alistair Ross 7,391 Reputation points Microsoft Employee
    2022-12-16T10:36:27.427+00:00

    Hi @Admin CDW

    If I understand the question right, you are trying to delete a resource group which has multiple resources including a VNet. This vNET has a load balancer attached to it, which resides in a different resource group. You have tried to delete the first resource group with the vNET and it has failed because of the vNET still having attached resources.

    In this scenario this would be correct and by design. Azure has built in fail safes to prevent users from deleting resources that have dependencies on certain resources, like vNETs, for example you could have business critical workloads attached to a vNET and by deleting the vNET, cause a disaster for the organisation. You need to remove all resources first that are using the vNET by deleting them or migrating them to another vNET before you can delete the original one.

    With regards to the load balancer, you will need to contact the owner of that resource group (or the subscription / tenant admins) to get them to disassociate the load balancer with your vNET before you can delete it.

    I hope this helps provide you with the information you need. If it does, please make sure to mark the question as answered so it helps other people in future.

    Kind regards

    Alistair


  2. Kumar Gaurav 1 Reputation point Microsoft Employee
    2022-12-20T07:51:50.797+00:00

    Hi @Admin CDW ,

    AKS builds upon a number of Azure infrastructure resources, including virtual machine scale sets, virtual networks, and managed disks. This enables you to leverage many of the core capabilities of the Azure platform within the managed Kubernetes environment provided by AKS. For example, most Azure virtual machine types can be used directly with AKS and Azure Reservations can be used to receive discounts on those resources automatically.

    To enable this architecture, each AKS deployment spans two resource groups:

    You create the first resource group. This group contains only the Kubernetes service resource. The AKS resource provider automatically creates the second resource group during deployment. An example of the second resource group is MC_myResourceGroup_myAKSCluster_eastus. For information on how to specify the name of this second resource group, see the next section.

    The second resource group, known as the node resource group, contains all of the infrastructure resources associated with the cluster. These resources include the Kubernetes node VMs, virtual networking, and storage. By default, the node resource group has a name like MC_myResourceGroup_myAKSCluster_eastus. AKS automatically deletes the node resource whenever the cluster is deleted, so it should only be used for resources which share the cluster's lifecycle.

    Source : Azure Documentation FAQ Link

    In order to delete the resource group, you need to ensure that any of its resources are not linked with any other service. In your case, the Load Balancer is attached to a resource. You are unable to access this resource because you do not have the privilege. Please reach out to your subscription Owner to grant you the access. Once the access is granted, you should be able to delete it.

    Please let me if this helps or you are still encountering the issue.

    Thank you.


  3. Kumar Gaurav 1 Reputation point Microsoft Employee
    2022-12-20T08:11:53.957+00:00

    Hello @Admin CDW ,

    Thank you for your quick response.

    Deleting the resource from the backend is not possible, but we do have a technical team who can look into your environment and help. I would recommend you open a Technical Support ticket.

    How to create azure support 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.