简体   繁体   中英

AKS not able to create new subnet new node pool in a seperate subnet

I am trying to create a new node pool in a newly created subnet with this command

az aks nodepool add \
    --resource-group nems12 \
    --cluster-name nems-cluster \
    --name aksperfnode \
    --node-count 1 \
    --vnet-subnet-id aks2

But getting an error Agent pools subnet is not in Vnet CIDR but it is actually added in vnet address space and a subnet is created for it

I tested in my environment its working fine for me. You need to provide --vnet-subnet-id in this format /subscriptions/b83c1eXXXXX5ba-2bXXXXX23f/resourceGroups/v-raxXXXXee/providers/Microsoft.Network/virtualNetworks/TestVNET/subnets/AKS-Subnet .

在此处输入图像描述

在此处输入图像描述

Note : As Andriy Bilous also check that suggestion if you are still getting an error after followed my solution.

  • please check that the subnet assigned to the AKS node pool is not a delegated subnet.

  • Select NSG as None for your existing Subnet. Which might sometime cause error.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM