Skip to content

Commit 3ee7c77

Browse files
authored
Update subnetisdelegated-error.md
1 parent 9ada35f commit 3ee7c77

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

support/azure/azure-kubernetes/error-codes/subnetisdelegated-error.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ This article discusses how to identify and resolve the SubnetIsDelegated error t
1414

1515
## Prerequisites
1616

17-
Azure CLI (version 2.0.59 or a later version)
17+
- Azure CLI (version 2.0.59 or a later version)
1818

1919
## Symptoms
2020

2121
When you try to create a node pool in an AKS cluster, you receive the following error message:
2222

23-
**Code:** **SubnetIsDelegated**
24-
25-
**Message:** `AgentPoolProfile` subnet with id \<subnet-id\> cannot be used as it\'s a delegated subnet. Please check <https://aka.ms/adv-network-prerequest> for more details.
23+
> **Code:** **SubnetIsDelegated**
24+
>
25+
> **Message:** `AgentPoolProfile` subnet with id \<subnet-id\> cannot be used as it\'s a delegated subnet. Please check <https://aka.ms/adv-network-prerequest> for more details.
2626
2727
## Cause
2828

@@ -34,18 +34,24 @@ To resolve this issue, follow these steps:
3434

3535
1. Verify that the subnet is correctly delegated:
3636

37+
```
3738
az network vnet subnet show \\ \--resource-group \$RESOURCE_GROUP \--vnet-name \$VNET_NAME \--name \$SUBNET_NAME \--query delegations
39+
```
3840

3941
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:
4042

43+
```
4144
az network vnet subnet update \--resource-group \$RESOURCE_GROUP
4245
\--vnet-name \$VNET_NAME \--name \$SUBNET_NAME \--remove delegations 0
43-
46+
```
47+
4448
1. Run the following command to add Managed Cluster delegation:
4549

50+
```
4651
az network vnet subnet update \--resource-group \$RESOURCE_GROUP
4752
\--vnet-name \$VNET_NAME \--name \$SUBNET_NAME \--delegations
4853
Microsoft.ContainerService/managedClusters
54+
```
4955

5056
1. After the subnet delegation is removed, try again to create the node pool by using the `az aks nodepool add` command.
5157

0 commit comments

Comments
 (0)