Skip to content

Commit 252447c

Browse files
authored
Merge pull request #16385 from sethmanheim/aa-contrib
Pull PR from contribution
2 parents 881a853 + 3ffff04 commit 252447c

12 files changed

+356
-53
lines changed

AKS-Hybrid/TOC.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,20 @@
5656
href: create-clusters-bicep.md
5757
- name: Terraform
5858
href: create-clusters-terraform.md
59-
- name: Deploy to Azure using a quickstart template
59+
- name: Quickstart template
6060
href: /samples/azure/azure-quickstart-templates/aks-on-ashci
6161
- name: Azure Resource Manager template
6262
href: resource-manager-quickstart.md
6363
- name: Networking
6464
items:
65-
- name: Create logical networks for Kubernetes clusters
65+
- name: Create logical networks
6666
href: aks-networks.md
67+
- name: Simplify outbound connectivity
68+
href: arc-gateway-aks-arc.md
69+
- name: Deploy in environments with low internet bandwidth
70+
items:
71+
- name: Disable Windows nodepool
72+
href: disable-windows-nodepool.md
6773
- name: Use MetalLB load balancer
6874
items:
6975
- name: Azure CLI
@@ -86,6 +92,10 @@
8692
href: restrict-ssh-access.md
8793
- name: Deploy and configure Workload Identity
8894
href: workload-identity.md
95+
- name: High availability
96+
items:
97+
- name: Use availability sets
98+
href: availability-sets.md
8999
- name: Storage
90100
items:
91101
- name: CSI storage drivers
@@ -106,15 +116,13 @@
106116
href: cluster-labels.md
107117
- name: Taints
108118
href: aks-arc-use-node-taints.md
109-
- name: Use availability sets
110-
href: availability-sets.md
111-
- name: Scale a Kubernetes cluster
119+
- name: Use auto-scaler
112120
href: auto-scale-aks-arc.md
113121
- name: Upgrade Kubernetes clusters
114122
href: cluster-upgrade.md
115123
- name: Create Windows Server containers
116124
href: aks-create-containers.md
117-
- name: Integrate Azure Container Registry with a Kubernetes cluster
125+
- name: Integrate Azure Container Registry
118126
href: deploy-container-registry.md
119127
- name: Monitoring and logging
120128
items:

AKS-Hybrid/aks-create-clusters-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ az extension add -n connectedk8s --upgrade
4747
Use the `az aksarc create` command to create a Kubernetes cluster in AKS Arc. Make sure you sign in to Azure before running this command. If you have multiple Azure subscriptions, select the appropriate subscription ID using the [az account set](/cli/azure/account#az-account-set) command.
4848

4949
```azurecli
50-
az aksarc create -n $aksclustername -g $resource_group --custom-location $customlocationID --vnet-ids $logicnetId --aad-admin-group-object-ids $aadgroupID --generate-ssh-keys --load-balancer-count 0 --control-plane-ip $controlplaneIP
50+
az aksarc create -n $aksclustername -g $resource_group --custom-location $customlocationID --vnet-ids $logicnetId --aad-admin-group-object-ids $aadgroupID --generate-ssh-keys
5151
```
5252

5353
After a few minutes, the command completes and returns JSON-formatted information about the cluster.

AKS-Hybrid/aks-hci-ip-address-planning.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,29 @@
22
title: IP address planning for AKS
33
description: Learn about how to plan for IP addresses and reservation, to deploy AKS in production.
44
ms.topic: conceptual
5-
ms.date: 10/08/2024
5+
ms.date: 11/19/2024
66
author: sethmanheim
77
ms.author: sethm
88
ms.reviewer: abha
99
ms.lastreviewed: 10/08/2024
1010
---
1111

12-
# AKS enabled by Azure Arc IP address planning requirements
12+
# IP address planning requirements
1313

1414
[!INCLUDE [hci-applies-to-23h2](includes/hci-applies-to-23h2.md)]
1515

1616
IP address planning for AKS involves designing a network that supports applications, node pools, pod networks, service communication, and external access. This article walks you through some key considerations for effective IP address planning, and minimum number of IP addresses required to deploy AKS in production. See the [AKS networking concepts and requirements](aks-hci-network-system-requirements.md) before reading this article.
1717

18-
1918
## Simple IP address planning for Kubernetes clusters and applications
2019

2120
In the following scenario walk-through, you reserve IP addresses from a single network for your Kubernetes clusters and services. This example is the most straightforward and simple scenario for IP address assignment.
2221

2322
| IP address requirement | Minimum number of IP addresses | How and where to make this reservation |
2423
|------------------|---------|---------------|
25-
| AKS Arc VM IPs | Reserve one IP address for every worker node in your Kubernetes cluster. For example, if you want to create 3 node pools with 3 nodes in each node pool, you need to have 9 IP addresses in your IP pool. | Reserve IP addresses for AKS Arc VMs through IP pools in Arc VM logical network. |
26-
| AKS Arc K8s version upgrade IPs | Because AKS Arc performs rolling upgrades, reserve one IP address for every AKS Arc cluster for Kubernetes version upgrade operations. | Reserve IP addresses for K8s version upgrade operations through IP pools in Arc VM logical networks. |
27-
| Control plane IP | Reserve one IP address for every Kubernetes cluster in your environment. For example, if you want to create 5 clusters in total, reserve 5 IP addresses, one for each Kubernetes cluster. | Reserve IP addresses for control plane IPs in the same subnet as the Arc VM logical network, but outside the specified IP pool. |
28-
| Load balancer IPs | The number of IP addresses reserved depends on your application deployment model. As a starting point, you can reserve one IP address for every Kubernetes service. | Reserve IP addresses for control plane IPs in the same subnet as the Arc VM logical network, but outside the specified IP pool. |
24+
| AKS Arc VM IPs | Reserve one IP address for every worker node in your Kubernetes cluster. For example, if you want to create 3 node pools with 3 nodes in each node pool, you need 9 IP addresses in your IP pool. | Reserve IP addresses through IP pools in the Arc VM logical network. |
25+
| AKS Arc K8s version upgrade IPs | Because AKS Arc performs rolling upgrades, reserve one IP address for every AKS Arc cluster for Kubernetes version upgrade operations. | Reserve IP addresses through IP pools in the Arc VM logical network. |
26+
| Control plane IP | Reserve one IP address for every Kubernetes cluster in your environment. For example, if you want to create 5 clusters in total, reserve 5 IP addresses, one for each Kubernetes cluster. | Reserve IP addresses through IP pools in the Arc VM logical network. |
27+
| Load balancer IPs | The number of IP addresses reserved depends on your application deployment model. As a starting point, you can reserve one IP address for every Kubernetes service. | Reserve IP addresses in the same subnet as the Arc VM logical network, but outside the IP pool. |
2928

3029
### Example walkthrough for IP address reservation for Kubernetes clusters and applications
3130

@@ -48,13 +47,35 @@ Continuing with this example, and adding it to the following table, you get:
4847

4948
| Parameter | Number of IP addresses | How and where to make this reservation |
5049
|------------------|---------|---------------|
51-
| AKS Arc VMs and K8s version upgrade | Reserve 14 IP addresses | Make this reservation through IP pools in the Azure Local logical network. |
52-
| Control plane IP | Reserve 2 IP addresses, one for AKS Arc cluster | Use the `controlPlaneIP` parameter to pass the IP address for control plane IP. Ensure that this IP is in the same subnet as the Arc logical network, but outside the IP pool defined in the Arc logical network. |
50+
| AKS Arc VMs, K8s version upgrade and control plane IP | Reserve 16 IP addresses | Make this reservation through IP pools in the Azure Local logical network. |
5351
| Load balancer IPs | 3 IP address for Kubernetes services, for Jane's voting application. | These IP addresses are used when you install a load balancer on cluster A. You can use the MetalLB Arc extension, or bring your own 3rd party load balancer. Ensure that this IP is in the same subnet as the Arc logical network, but outside the IP pool defined in the Arc VM logical network. |
5452

53+
#### Example CLI commands for IP address reservation for Kubernetes clusters and applications
54+
55+
This section describes the set of commands Jane runs for her scenario. First, create a logical network with an IP pool that has at least 16 IP addresses. We created the IP pool with 20 IP addresses to provide the option to scale on day N. For detailed information about parameter options in logical networks, see [`az stack-hci-vm network lnet create`](/cli/azure/stack-hci-vm/network/lnet#az-stack-hci-vm-network-lnet-create):
56+
57+
```azurecli
58+
$ipPoolStart = "10.220.32.18"
59+
$ipPoolEnd = "10.220.32.37"
60+
az stack-hci-vm network lnet create --subscription $subscription --resource-group $resource_group --custom-location $customLocationID --name $lnetName --vm-switch-name $vmSwitchName --ip-allocation-method "Static" --address-prefixes $addressPrefixes --gateway $gateway --dns-servers $dnsServers --ip-pool-start $ipPoolStart --ip-pool-end $ipPoolEnd
61+
```
62+
63+
Next, create an AKS Arc cluster with the previous logical network:
64+
65+
```azurecli
66+
az aksarc create -n $aksclustername -g $resource_group --custom-location $customlocationID --vnet-ids $lnetName --aad-admin-group-object-ids $aadgroupID --generate-ssh-keys
67+
```
68+
69+
Now you can enable MetalLB load balancer with an IP pool of 3 IP addresses, in the same subnet as the Arc VM logical network. You can add more IP pools later if your application needs an increase. For detailed requirements, see the [MetalLB Arc extension overview](load-balancer-overview.md).
70+
71+
```azurecli
72+
az k8s-runtime load-balancer create --load-balancer-name $lbName --resource-uri subscriptions/$subscription/resourceGroups/$resource_group/providers/Microsoft.Kubernetes/connectedClusters/metallb-demo --addresses 172.25.28.145-172.25.28.147 --advertise-mode ARP
73+
```
74+
5575
### LNETs considerations for AKS clusters and Arc VMs
5676

5777
Logical networks on Azure Local are used by both AKS clusters and Arc VMs. You can configure logical networks in one of the following 2 ways:
78+
5879
- Share a logical network between AKS and Arc VMs.
5980
- Define separate logical networks for AKS clusters and Arc VMs.
6081

@@ -68,9 +89,10 @@ Sharing a logical network between AKS and Arc VMs on Azure Local offers the bene
6889
| **Security considerations** | Increased risk of cross-communication vulnerabilities if not properly segmented. | Better security as each network can be segmented and isolated more strictly. |
6990
| **Impact of network failures** | A failure in the shared network can affect both AKS and Arc VMs simultaneously. | A failure in one network affects only the workloads within that network, reducing overall risk. |
7091

71-
7292
## IP address range allocation for pod CIDR and service CIDR
7393

94+
This section describes the IP address ranges used by Kubernetes for pod and service communication within a cluster. These IP address ranges are defined during the AKS cluster creation process and are used to assign unique IP addresses to pods and services within the cluster.
95+
7496
### Pod network CIDR
7597

7698
Pod network CIDR is a range of IP addresses used by Kubernetes to assign unique IP addresses to the individual pods running within a Kubernetes cluster. Each pod gets its own IP address within this range, allowing pods to communicate with each other and with services within the cluster. In AKS, pod IP addresses are assigned via *Calico CNI in VXLAN mode*. Calico VXLAN helps create *Overlay networks*, where the IP addresses of pods (from the pod network CIDR) are virtualized and tunneled through the physical network. In this mode, each pod is assigned an IP address from the pod network CIDR, but this IP address is not directly routable on the physical network. Instead, it is encapsulated within the network packets and sent through the underlying physical network to reach its destination pod on another node.
@@ -81,7 +103,7 @@ AKS provides a **default value of 10.244.0.0/16** for the pod network CIDR. AKS
81103

82104
The Service network CIDR is the range of IP addresses reserved for Kubernetes services like LoadBalancers, ClusterIP, and NodePort within a cluster. Kubernetes supports the following service types:
83105
- ClusterIP: The default service type, which exposes the service within the cluster. The IP assigned from the Service network CIDR is only accessible within the Kubernetes cluster.
84-
- NodePort: Exposes the service on a specific port on each nodes IP address. The ClusterIP is still used internally, but external access is through the node IPs and a specific port.
106+
- NodePort: Exposes the service on a specific port on each node's IP address. The ClusterIP is still used internally, but external access is through the node IPs and a specific port.
85107
- LoadBalancer: This type creates a cloud-provider-managed load balancer and exposes the service externally. The cloud provider typically manages the external IP assignment, while the internal ClusterIP remains within the service network CIDR.
86108

87109
AKS provides a **default value of 10.96.0.0/12** for the service network CIDR. AKS does not support customizations for the service network CIDR today.

AKS-Hybrid/aks-hci-network-system-requirements.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: AKS enabled by Azure Arc network requirements
33
description: Learn about AKS network prerequisites.
44
ms.topic: overview
5-
ms.date: 04/02/2024
5+
ms.date: 11/19/2024
66
author: sethmanheim
77
ms.author: sethm
88
ms.reviewer: abha
@@ -17,11 +17,10 @@ This article introduces core networking concepts for your VMs and applications i
1717

1818
In this conceptual article, the following key components are introduced. These components need a static IP address in order for the AKS Arc cluster and applications to create and operate successfully:
1919

20-
- AKS cluster VMs
21-
- AKS control plane IP
20+
- Logical network for AKS Arc VMs and control plane IP
2221
- Load balancer for containerized applications
2322

24-
## Networking for AKS cluster VMs
23+
## Logical networks for AKS Arc VMs and control plane IP
2524

2625
Kubernetes nodes are deployed as specialized virtual machines in AKS enabled by Arc. These VMs are allocated IP addresses to enable communication between Kubernetes nodes. AKS Arc uses Azure Local logical networks to provide IP addresses and networking for the underlying VMs of the Kubernetes clusters. For more information about logical networks, see [Logical networks for Azure Local](/azure-stack/hci/manage/create-logical-networks?tabs=azurecli). You must plan to reserve one IP address per AKS cluster node VM in your Azure Local environment.
2726

@@ -37,16 +36,15 @@ The following parameters are required in order to use a logical network for AKS
3736
| `--dns-servers` | Space-separated list of DNS server IP addresses. Usage: `--dns-servers 10.220.32.16 10.220.32.17`. | ![Supported](media/aks-hybrid-networks/check.png) |
3837
| `--gateway` | Gateway. The gateway IP address must be within the scope of the address prefix. Usage: `--gateway 10.220.32.16`. | ![Supported](media/aks-hybrid-networks/check.png) |
3938
| `--ip-allocation-method` | The IP address allocation method. Supported values are "Static". Usage: `--ip-allocation-method "Static"`. | ![Supported](media/aks-hybrid-networks/check.png) |
40-
| `--ip-pool-start` | The start IP address of your IP pool. The address must be in range of the address prefix. Usage: `--ip-pool-start "10.220.32.18"`. | ![Supported](media/aks-hybrid-networks/check.png) |
41-
| `--ip-pool-end` | The end IP address of your IP pool. The address must be in range of the address prefix. Usage: `--ip-pool-end "10.220.32.38"`. | ![Supported](media/aks-hybrid-networks/check.png) |
4239
| `--vm-switch-name` | The name of the VM switch. Usage: `--vm-switch-name "vm-switch-01"`. | ![Supported](media/aks-hybrid-networks/check.png) |
40+
| `--ip-pool-start` | If you use MetalLB or any other third party load balancer in L2/ARP mode, we highly recommend using IP pools to separate AKS Arc IP requirements from load balancer IPs. This recommendation is to help avoid IP address conflicts that can lead to unintended and hard-to-diagnose failures. This value is the start IP address of your IP pool. The address must be in the range of the address prefix. Usage: `--ip-pool-start "10.220.32.18"`. | Optional, but highly recommended. |
41+
| `--ip-pool-end` | If you use MetalLB or any other third party load balancer in L2/ARP mode, we highly recommend using IP pools to separate AKS Arc IP requirements from load balancer IPs. This recommendation is to help avoid IP address conflicts that can lead to unintended and hard-to-diagnose failures. This value is the end IP address of your IP pool. The address must be in the range of the address prefix. Usage: `--ip-pool-end "10.220.32.38"`. | Optional, but highly recommended. |
4342

44-
## Control plane IP
43+
### Control plane IP
4544

46-
Kubernetes uses a control plane to ensure every component in the Kubernetes cluster is kept in the desired state. The control plane also manages and maintains the worker nodes that hold the containerized applications. AKS enabled by Arc deploys the KubeVIP load balancer to ensure that the API server IP address of the Kubernetes control plane is available at all times. This KubeVIP instance requires a single immutable "control plane IP address" to function correctly.
45+
Kubernetes uses a control plane to ensure every component in the Kubernetes cluster is kept in the desired state. The control plane also manages and maintains the worker nodes that hold the containerized applications. AKS enabled by Arc deploys the KubeVIP load balancer to ensure that the API server IP address of the Kubernetes control plane is available at all times. This KubeVIP instance requires a single immutable "control plane IP address" to function correctly. AKS Arc automatically chooses a control plane IP for you from the logical network passed during the Kubernetes cluster create operation.
4746

48-
> [!NOTE]
49-
> The control plane IP is a required parameter to create a Kubernetes cluster. You must ensure that the control plane IP address of a Kubernetes cluster does not overlap with anything else, including Arc VM logical networks, infrastructure network IPs, load balancers, etc. The control plane IP also must be within the scope of the address prefix of the logical network, but outside the IP pool. This is because the IP pool is only used for VMs, and if you choose an IP address from the IP pool for the control plane, an IP address conflict can result. Overlapping IP addresses can lead to unexpected failures for both the AKS cluster and any other place the IP address is being used. You must plan to reserve one IP address per Kubernetes cluster in your environment.
47+
You also have the option of passing a control plane IP. In such cases, the control plane IP must be within the scope of the address prefix of the logical network. You must ensure that the control plane IP address does not overlap with anything else, including Arc VM logical networks, infrastructure network IPs, load balancers, etc. Overlapping IP addresses can lead to unexpected failures for both the AKS cluster and any other place the IP address is being used. You must plan to reserve one IP address per Kubernetes cluster in your environment.
5048

5149
## Load balancer IPs for containerized applications
5250

@@ -60,7 +58,7 @@ Whether you choose the Arc extension for MetalLB, or bring your own load balance
6058
- Provide IP addresses for your services from the same subnet as the AKS Arc VMs.
6159
- Use a different network and list of IP addresses if your application needs external load balancing.
6260

63-
Regardless of the option you choose, you must ensure that the IP addresses allocated to the load balancer don't conflict with the IP addresses in the logical network or control plane IPs for your Kubernetes clusters. Conflicting IP addresses can lead to unforeseen failures in your AKS deployment and applications.
61+
Regardless of the option you choose, you must ensure that the IP addresses allocated to the load balancer don't conflict with the IP addresses in the logical network. Conflicting IP addresses can lead to unforeseen failures in your AKS deployment and applications.
6462

6563
## Proxy settings
6664

0 commit comments

Comments
 (0)