Skip to content

Commit 490ab67

Browse files
Merge pull request #220432 from wedaly/azure-cni-managed-vnet
Use managed VNET for Azure CNI overlay
2 parents 227295b + a1ceb51 commit 490ab67

File tree

2 files changed

+11
-44
lines changed

2 files changed

+11
-44
lines changed

articles/aks/azure-cni-overlay.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -129,31 +129,15 @@ az provider register --namespace Microsoft.ContainerService
129129

130130
## Set up overlay clusters
131131

132-
The following steps create a new virtual network with a subnet for the cluster nodes and an AKS cluster that uses Azure CNI Overlay.
133-
134-
1. Create a virtual network with a subnet for the cluster nodes. Replace the values for the variables `resourceGroup`, `vnet` and `location`.
135-
136-
```azurecli-interactive
137-
resourceGroup="myResourceGroup"
138-
vnet="myVirtualNetwork"
139-
location="westcentralus"
140-
141-
# Create the resource group
142-
az group create --name $resourceGroup --location $location
143-
144-
# Create a VNet and a subnet for the cluster nodes
145-
az network vnet create -g $resourceGroup --location $location --name $vnet --address-prefixes 10.0.0.0/8 -o none
146-
az network vnet subnet create -g $resourceGroup --vnet-name $vnet --name nodesubnet --address-prefix 10.10.0.0/16 -o none
147-
```
148-
149-
2. Create a cluster with Azure CNI Overlay. Use the argument `--network-plugin-mode` to specify that this is an overlay cluster. If the pod CIDR is not specified then AKS assigns a default space, viz. 10.244.0.0/16. Replace the values for the variables `clusterName` and `subscription`.
150-
151-
```azurecli-interactive
152-
clusterName="myOverlayCluster"
153-
subscription="aaaaaaa-aaaaa-aaaaaa-aaaa"
154-
155-
az aks create -n $clusterName -g $resourceGroup --location $location --network-plugin azure --network-plugin-mode overlay --pod-cidr 192.168.0.0/16 --vnet-subnet-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnet/subnets/nodesubnet
156-
```
132+
Create a cluster with Azure CNI Overlay. Use the argument `--network-plugin-mode` to specify that this is an overlay cluster. If the pod CIDR is not specified then AKS assigns a default space, viz. 10.244.0.0/16. Replace the values for the variables `clusterName`, `resourceGroup`, and `location`.
133+
134+
```azurecli-interactive
135+
clusterName="myOverlayCluster"
136+
resourceGroup="myResourceGroup"
137+
location="westcentralus"
138+
139+
az aks create -n $clusterName -g $resourceGroup --location $location --network-plugin azure --network-plugin-mode overlay --pod-cidr 192.168.0.0/16
140+
```
157141

158142
## Next steps
159143

@@ -162,4 +146,4 @@ To learn how to utilize AKS with your own Container Network Interface (CNI) plug
162146
<!-- LINKS - internal -->
163147
[az-provider-register]: /cli/azure/provider#az-provider-register
164148
[az-feature-register]: /cli/azure/feature#az-feature-register
165-
[az-feature-show]: /cli/azure/feature#az-feature-show
149+
[az-feature-show]: /cli/azure/feature#az-feature-show

articles/aks/azure-cni-powered-by-cilium.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ Create the cluster using `--enable-cilium-dataplane`:
112112
```azurecli-interactive
113113
az aks create -n <clusterName> -g <resourceGroupName> -l <location> \
114114
--max-pods 250 \
115-
--node-count 2 \
116115
--network-plugin azure \
117116
--vnet-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/nodesubnet \
118117
--pod-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/podsubnet \
@@ -121,29 +120,13 @@ az aks create -n <clusterName> -g <resourceGroupName> -l <location> \
121120

122121
### Option 2: Assign IP addresses from an overlay network
123122

124-
Run these commands to create a resource group and VNet with a single subnet:
125-
126-
```azurecli-interactive
127-
# Create the resource group
128-
az group create --name <resourceGroupName> --location <location>
129-
```
130-
131-
```azurecli-interactive
132-
# Create a VNet with a subnet for nodes and a subnet for pods
133-
az network vnet create -g <resourceGroupName> --location <location> --name <vnetName> --address-prefixes <address prefix, example: 10.0.0.0/8> -o none
134-
az network vnet subnet create -g <resourceGroupName> --vnet-name <vnetName> --name nodesubnet --address-prefixes <address prefix, example: 10.240.0.0/16> -o none
135-
```
136-
137-
Then create the cluster using `--enable-cilium-dataplane`:
123+
Run this commands to create a cluster with an overlay network and Cilium. Replace the values for `<clusterName>`, `<resourceGroupName>`, and `<location>`:
138124

139125
```azurecli-interactive
140126
az aks create -n <clusterName> -g <resourceGroupName> -l <location> \
141-
--max-pods 250 \
142-
--node-count 2 \
143127
--network-plugin azure \
144128
--network-plugin-mode overlay \
145129
--pod-cidr 192.168.0.0/16 \
146-
--vnet-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/nodesubnet \
147130
--enable-cilium-dataplane
148131
```
149132

0 commit comments

Comments
 (0)