create AKS via Cli/Powershell its create second resource group

Stefan Kiessig 40 Reputation points
2025-02-05T17:00:56.5933333+00:00

Hello, when I create an AKS via Azure Cli or Powershell, a second resource group is created with the prefix MC. This group contains

  • Public IP - Access of the Cluster API
  • Network NSG
  • Virtual Machine Scale Set
  • Load balancer

Is it possible to give this resource group and these resources their own name according to an existing naming convention?

Thanks for your support

Stefan

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,260 questions
{count} votes

Accepted answer
  1. Akshay kumar Mandha 2,510 Reputation points Microsoft Vendor
    2025-02-06T18:12:40.4166667+00:00

    Hi Stefan Kiessig,
    Thanks for patience while reviewing your thread.!
    I found the one document related to this why it will be creating the second resource group
    The AKS creates a second resource group to automatically manage the virtual machines, network, and storage needed to run your Kubernetes cluster. This keeps everything organized and makes it easier for AKS to maintain the underlying infrastructure
    Please refer below content in documentation
    Why are two resource groups created with AKS?

    AKS builds upon many Azure infrastructure resources, including Virtual Machine Scale Sets, virtual networks, and managed disks. These integrations enable you to apply 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:

    1. 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.
    2. 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 group whenever you delete the cluster. You should only use this resource group for resources that share the cluster's lifecycle.

    If you found this information helpful and my inputs, please click an accepting the answer and don't forget to "Upvote" on my post for other community members referenceUser's image


0 additional answers

Sort by: Most helpful

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.