Skip to content

Commit 2a6fb6e

Browse files
authored
Merge pull request #235336 from asudbring/cni-patch
Paragraph move from one article to the other for request from Khushbu Parekh
2 parents 828f313 + 26f6201 commit 2a6fb6e

File tree

4 files changed

+57
-43
lines changed

4 files changed

+57
-43
lines changed

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

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
---
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
34
description: Learn how to configure Azure CNI (advanced) networking for dynamic allocation of IPs and enhanced subnet support in Azure Kubernetes Service (AKS)
5+
author: asudbring
6+
ms.author: allensu
7+
ms.service: azure-kubernetes-service
8+
ms.subservice: aks-networking
49
ms.topic: article
5-
ms.date: 01/09/2023
10+
ms.date: 04/20/2023
611
ms.custom: references_regions, devx-track-azurecli
712
---
813

@@ -14,8 +19,8 @@ It offers the following benefits:
1419

1520
* **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.
1621
* **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.
1924
* **Kubernetes network policies**: Both the Azure Network Policies and Calico work with this new solution.
2025

2126
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
106111
--no-wait
107112
```
108113

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+
109156
## Dynamic allocation of IP addresses and enhanced subnet support FAQs
110157

111158
* **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:
133180
* [Create an ingress controller with a dynamic public IP and configure Let's Encrypt to automatically generate TLS certificates][aks-ingress-tls]
134181
* [Create an ingress controller with a static public IP and configure Let's Encrypt to automatically generate TLS certificates][aks-ingress-static-tls]
135182

183+
<!-- LINKS - External -->
184+
[github]: https://raw.githubusercontent.com/microsoft/Docker-Provider/ci_prod/kubernetes/container-azm-ms-agentconfig.yaml
185+
136186
<!-- LINKS - Internal -->
137187
[aks-ingress-basic]: ingress-basic.md
138188
[aks-ingress-tls]: ingress-tls.md

articles/aks/configure-azure-cni.md

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ titleSuffix: Azure Kubernetes Service
44
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.
55
author: asudbring
66
ms.author: allensu
7+
ms.service: azure-kubernetes-service
78
ms.subservice: aks-networking
89
ms.topic: how-to
9-
ms.date: 05/16/2022
10+
ms.date: 04/20/2023
1011
ms.custom: references_regions, devx-track-azurecli
1112
---
1213

@@ -147,43 +148,6 @@ The following screenshot from the Azure portal shows an example of configuring t
147148

148149
:::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.":::
149150

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.":::
186-
187151
## Frequently asked questions
188152

189153
* **Can I deploy VMs in my cluster subnet?**

articles/azure-monitor/containers/container-insights-reports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To create a custom workbook based on any of these workbooks, select the **View W
4343
- IPs assigned to a pod.
4444

4545
>[!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).
4747
4848
## Resource Monitoring workbooks
4949

0 commit comments

Comments
 (0)