Skip to content

Commit 5bcbbe6

Browse files
committed
Added prereq for enabling monitoring on the cluster
1 parent 0d68c44 commit 5bcbbe6

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

articles/aks/configure-azure-cni-dynamic-ip-allocation.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ This article shows you how to use Azure CNI networking for dynamic allocation of
3434
* Review the [deployment parameters][azure-cni-deployment-parameters] for configuring basic Azure CNI networking in AKS, as the same parameters apply.
3535
* AKS Engine and DIY clusters aren't supported.
3636
* Azure CLI version `2.37.0` or later.
37+
* If you have an existing cluster, you need to enable Container Insights for monitoring IP subnet usage. You can enable Container Insights using the [`az aks enable-addons`][az-aks-enable-addons] command, as shown in the following example:
38+
39+
```azurecli-interactive
40+
az aks enable-addons --addons monitoring --name <cluster-name> --resource-group <resource-group-name>
41+
```
3742
3843
## Plan IP addressing
3944
@@ -76,23 +81,24 @@ location="westcentralus"
7681
az group create --name $resourceGroup --location $location
7782
7883
# Create our two subnet network
79-
az network vnet create -g $resourceGroup --location $location --name $vnet --address-prefixes 10.0.0.0/8 -o none
80-
az network vnet subnet create -g $resourceGroup --vnet-name $vnet --name nodesubnet --address-prefixes 10.240.0.0/16 -o none
81-
az network vnet subnet create -g $resourceGroup --vnet-name $vnet --name podsubnet --address-prefixes 10.241.0.0/16 -o none
84+
az network vnet create -resource-group $resourceGroup --location $location --name $vnet --address-prefixes 10.0.0.0/8 -o none
85+
az network vnet subnet create --resource-group $resourceGroup --vnet-name $vnet --name nodesubnet --address-prefixes 10.240.0.0/16 -o none
86+
az network vnet subnet create --resource-group $resourceGroup --vnet-name $vnet --name podsubnet --address-prefixes 10.241.0.0/16 -o none
8287
```
8388

84-
Create the cluster, referencing the node subnet using `--vnet-subnet-id` and the pod subnet using `--pod-subnet-id`.
89+
Create the cluster, referencing the node subnet using `--vnet-subnet-id` and the pod subnet using `--pod-subnet-id` and enabling the monitoring add-on.
8590

8691
```azurecli-interactive
8792
clusterName="myAKSCluster"
8893
subscription="aaaaaaa-aaaaa-aaaaaa-aaaa"
8994
90-
az aks create -n $clusterName -g $resourceGroup -l $location \
95+
az aks create --name $clusterName --resource-group $resourceGroup --location $location \
9196
--max-pods 250 \
9297
--node-count 2 \
9398
--network-plugin azure \
9499
--vnet-subnet-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnet/subnets/nodesubnet \
95-
--pod-subnet-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnet/subnets/podsubnet
100+
--pod-subnet-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnet/subnets/podsubnet \
101+
--enable-addons monitoring
96102
```
97103

98104
### Adding node pool
@@ -191,3 +197,4 @@ Learn more about networking in AKS in the following articles:
191197
[aks-ingress-internal]: ingress-internal-ip.md
192198
[azure-cni-prereq]: ./configure-azure-cni.md#prerequisites
193199
[azure-cni-deployment-parameters]: ./azure-cni-overview.md#deployment-parameters
200+
[az-aks-enable-addons]: /cli/azure/aks#az_aks_enable_addons

0 commit comments

Comments
 (0)