how to get the subnet id of the AKS agent pool

37821879 85 Reputation points
2023-10-12T13:10:05.8866667+00:00

how to get the virtual network name of AKS cluster, subnet name and subnet id of the AKS agent pool

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

1 answer

Sort by: Most helpful
  1. mutaz-msft 2,346 Reputation points Microsoft Employee
    2023-10-12T13:30:40.45+00:00

    Hi 37821879,

    There are multiple ways, one of them to check the VMSS in the Infrastructure resource group using this command:
    az vmss show -g {Infrastructure-resource-group} -n {VMSS_NAME} --query virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].subnet.id

    0 comments No comments