|
1 | 1 | --- |
2 | | -title: Troubleshoot the SubnetIsDelegated Error |
| 2 | +title: Troubleshoot the SubnetIsDelegated Error Code |
3 | 3 | description: Learn how to troubleshoot the SubnetIsDelegated error when you try to create a node pool. |
4 | | -ms.date: 08/05/2025 |
| 4 | +ms.date: 08/07/2025 |
5 | 5 | editor: v-jsitser |
6 | 6 | ms.reviewer: v-liuamson |
7 | 7 | ms.service: azure-kubernetes-service |
8 | 8 | #Customer intent: As an Azure Kubernetes user, I want to troubleshoot the SubnetIsDelegated error so that I can successfully create a node pool. |
9 | | -ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or ) |
| 9 | +ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool) |
10 | 10 | --- |
11 | 11 | # Troubleshoot the "SubnetIsDelegated" error |
12 | 12 |
|
@@ -34,23 +34,32 @@ To resolve this issue, follow these steps: |
34 | 34 |
|
35 | 35 | 1. Verify that the subnet is correctly delegated: |
36 | 36 |
|
| 37 | + ```bash |
| 38 | + az network vnet subnet show \ |
| 39 | + --resource-group $RESOURCE_GROUP \ |
| 40 | + --vnet-name $VNET_NAME \ |
| 41 | + --name $SUBNET_NAME \ |
| 42 | + --query delegations |
| 43 | + ``` |
| 44 | + |
| 45 | +1. Make sure that the output shows **Microsoft.ContainerService/managedClusters** as the delegated service or no delegated service. If the output shows any other Azure service delegation, remove it by running the following command: |
| 46 | + |
| 47 | + ```bash |
| 48 | + az network vnet subnet update \ |
| 49 | + --resource-group $RESOURCE_GROUP \ |
| 50 | + --vnet-name $VNET_NAME \ |
| 51 | + --name $SUBNET_NAME \ |
| 52 | + --remove delegations 0 |
37 | 53 | ``` |
38 | | - az network vnet subnet show \\ \--resource-group \$RESOURCE_GROUP \--vnet-name \$VNET_NAME \--name \$SUBNET_NAME \--query delegations |
39 | | - ``` |
40 | | - |
41 | | -1. Make sure that the output shows **Microsoft.ContainerService/managedClusters** as the delegated service or no delegated service. If the output shows any Azure service delegation, you have to remove it by running the following command: |
42 | 54 |
|
43 | | - ``` |
44 | | - az network vnet subnet update \--resource-group \$RESOURCE_GROUP |
45 | | - \--vnet-name \$VNET_NAME \--name \$SUBNET_NAME \--remove delegations 0 |
46 | | - ``` |
47 | | - |
48 | 55 | 1. Run the following command to add Managed Cluster delegation: |
49 | 56 |
|
50 | | - ``` |
51 | | - az network vnet subnet update \--resource-group \$RESOURCE_GROUP |
52 | | - \--vnet-name \$VNET_NAME \--name \$SUBNET_NAME \--delegations |
53 | | - Microsoft.ContainerService/managedClusters |
| 57 | + ```bash |
| 58 | + az network vnet subnet update \ |
| 59 | + --resource-group $RESOURCE_GROUP \ |
| 60 | + --vnet-name $VNET_NAME \ |
| 61 | + --name $SUBNET_NAME \ |
| 62 | + --delegations Microsoft.ContainerService/managedClusters |
54 | 63 | ``` |
55 | 64 |
|
56 | 65 | 1. After the subnet delegation is removed, try again to create the node pool by using the `az aks nodepool add` command. |
|
0 commit comments