You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/configure-azure-cni-dynamic-ip-allocation.md
+54-4Lines changed: 54 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,13 @@
1
1
---
2
-
title: Configure Azure CNI networking for dynamic allocation of IPs and enhanced subnet support in Azure Kubernetes Service (AKS)
2
+
title: Configure Azure CNI networking for dynamic allocation of IPs and enhanced subnet support
3
+
titleSuffix: Azure Kubernetes Service
3
4
description: Learn how to configure Azure CNI (advanced) networking for dynamic allocation of IPs and enhanced subnet support in Azure Kubernetes Service (AKS)
@@ -14,8 +19,8 @@ It offers the following benefits:
14
19
15
20
***Better IP utilization**: IPs are dynamically allocated to cluster Pods from the Pod subnet. This leads to better utilization of IPs in the cluster compared to the traditional CNI solution, which does static allocation of IPs for every node.
16
21
***Scalable and flexible**: Node and pod subnets can be scaled independently. A single pod subnet can be shared across multiple node pools of a cluster or across multiple AKS clusters deployed in the same VNet. You can also configure a separate pod subnet for a node pool.
17
-
***High performance**: Since pod are assigned VNet IPs, they have direct connectivity to other cluster pod and resources in the VNet. The solution supports very large clusters without any degradation in performance.
18
-
***Separate VNet policies for pods**: Since pods have a separate subnet, you can configure separate VNet policies for them that are different from node policies. This enables many useful scenarios such as allowing internet connectivity only for pods and not for nodes, fixing the source IP for pod in a node pool using a VNet Network NAT, and using NSGs to filter traffic between node pools.
22
+
***High performance**: Since pod are assigned virtual network IPs, they have direct connectivity to other cluster pod and resources in the VNet. The solution supports very large clusters without any degradation in performance.
23
+
***Separate VNet policies for pods**: Since pods have a separate subnet, you can configure separate VNet policies for them that are different from node policies. This enables many useful scenarios such as allowing internet connectivity only for pods and not for nodes, fixing the source IP for pod in a node pool using an Azure NAT Gateway, and using NSGs to filter traffic between node pools.
19
24
***Kubernetes network policies**: Both the Azure Network Policies and Calico work with this new solution.
20
25
21
26
This article shows you how to use Azure CNI networking for dynamic allocation of IPs and enhanced subnet support in AKS.
@@ -106,6 +111,48 @@ az aks nodepool add --cluster-name $clusterName -g $resourceGroup -n newnodepoo
106
111
--no-wait
107
112
```
108
113
114
+
## Monitor IP subnet usage
115
+
116
+
Azure CNI provides the capability to monitor IP subnet usage. To enable IP subnet usage monitoring, follow the steps below:
117
+
118
+
### Get the YAML file
119
+
120
+
1. Download or grep the file named container-azm-ms-agentconfig.yaml from [GitHub][github].
121
+
122
+
2. Find **`azure_subnet_ip_usage`** in integrations. Set `enabled` to `true`.
123
+
124
+
3. Save the file.
125
+
126
+
### Get the AKS credentials
127
+
128
+
Set the variables for subscription, resource group and cluster. Consider the following as examples:
129
+
130
+
```azurecli
131
+
132
+
$s="subscriptionId"
133
+
134
+
$rg="resourceGroup"
135
+
136
+
$c="ClusterName"
137
+
138
+
az account set -s $s
139
+
140
+
az aks get-credentials -n $c -g $rg
141
+
142
+
```
143
+
144
+
### Apply the config
145
+
146
+
1. Open terminal in the folder the downloaded **container-azm-ms-agentconfig.yaml** file is saved.
147
+
148
+
2. First, apply the config using the command: `kubectl apply -f container-azm-ms-agentconfig.yaml`
149
+
150
+
3. This will restart the pod and after 5-10 minutes, the metrics will be visible.
151
+
152
+
4. To view the metrics on the cluster, go to Workbooks on the cluster page in the Azure portal, and find the workbook named "Subnet IP Usage". Your view will look similar to the following:
153
+
154
+
:::image type="content" source="media/configure-azure-cni-dynamic-ip-allocation/ip-subnet-usage.png" alt-text="A diagram of the Azure portal's workbook blade is shown, and metrics for an AKS cluster's subnet IP usage are displayed.":::
155
+
109
156
## Dynamic allocation of IP addresses and enhanced subnet support FAQs
110
157
111
158
***Can I assign multiple pod subnets to a cluster/node pool?**
@@ -133,6 +180,9 @@ Learn more about networking in AKS in the following articles:
133
180
*[Create an ingress controller with a dynamic public IP and configure Let's Encrypt to automatically generate TLS certificates][aks-ingress-tls]
134
181
*[Create an ingress controller with a static public IP and configure Let's Encrypt to automatically generate TLS certificates][aks-ingress-static-tls]
Copy file name to clipboardExpand all lines: articles/aks/configure-azure-cni.md
+2-38Lines changed: 2 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,10 @@ titleSuffix: Azure Kubernetes Service
4
4
description: Learn how to configure Azure CNI (advanced) networking in Azure Kubernetes Service (AKS), including deploying an AKS cluster into an existing virtual network and subnet.
@@ -147,43 +148,6 @@ The following screenshot from the Azure portal shows an example of configuring t
147
148
148
149
:::image type="content" source="../aks/media/networking-overview/portal-01-networking-advanced.png" alt-text="Screenshot from the Azure portal showing an example of configuring these settings during AKS cluster creation.":::
149
150
150
-
## Monitor IP subnet usage
151
-
152
-
Azure CNI provides the capability to monitor IP subnet usage. To enable IP subnet usage monitoring, follow the steps below:
153
-
154
-
### Get the YAML file
155
-
156
-
1. Download or grep the file named container-azm-ms-agentconfig.yaml from [GitHub][github].
157
-
2. Find azure_subnet_ip_usage in integrations. Set `enabled` to `true`.
158
-
3. Save the file.
159
-
160
-
### Get the AKS credentials
161
-
162
-
Set the variables for subscription, resource group and cluster. Consider the following as examples:
163
-
164
-
```azurepowershell
165
-
166
-
$s="subscriptionId"
167
-
168
-
$rg="resourceGroup"
169
-
170
-
$c="ClusterName"
171
-
172
-
az account set -s $s
173
-
174
-
az aks get-credentials -n $c -g $rg
175
-
176
-
```
177
-
178
-
### Apply the config
179
-
180
-
1. Open terminal in the folder the downloaded container-azm-ms-agentconfig.yaml file is saved.
181
-
2. First, apply the config using the command: `kubectl apply -f container-azm-ms-agentconfig.yaml`
182
-
3. This will restart the pod and after 5-10 minutes, the metrics will be visible.
183
-
4. To view the metrics on the cluster, go to Workbooks on the cluster page in the Azure portal, and find the workbook named "Subnet IP Usage". Your view will look similar to the following:
184
-
185
-
:::image type="content" source="media/Azure-cni/ip-subnet-usage.png" alt-text="A diagram of the Azure portal's workbook blade is shown, and metrics for an AKS cluster's subnet IP usage are displayed.":::
Copy file name to clipboardExpand all lines: articles/azure-monitor/containers/container-insights-reports.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ To create a custom workbook based on any of these workbooks, select the **View W
43
43
- IPs assigned to a pod.
44
44
45
45
>[!NOTE]
46
-
> By default 16 IP's are allocated from subnet to each node. This cannot be modified to be less than 16. For instructions on how to enable subnet IP usage metrics, see [Monitor IP Subnet Usage](../../aks/configure-azure-cni.md#monitor-ip-subnet-usage).
46
+
> By default 16 IP's are allocated from subnet to each node. This cannot be modified to be less than 16. For instructions on how to enable subnet IP usage metrics, see [Monitor IP Subnet Usage](../../aks/configure-azure-cni-dynamic-ip-allocation.md#monitor-ip-subnet-usage).
0 commit comments