Skip to content

Commit 1352f76

Browse files
authored
Merge pull request #279547 from schaffererin/new-userstory261623
Core concepts for Azure Kubernetes Service (AKS) - Doc rewrite
2 parents b9f223c + 23c2e7f commit 1352f76

9 files changed

+273
-446
lines changed

articles/aks/.openpublishing.redirection.aks.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"redirect_url": "/azure/aks/ha-dr-overview",
2222
"redirect_document_id": false
2323
},
24+
{
25+
"source_path_from_root": "/articles/aks/concepts-clusters-workloads.md",
26+
"redirect_url": "/azure/aks/core-aks-concepts",
27+
"redirect_document_id": false
28+
},
2429
{
2530
"source_path_from_root": "/articles/aks/upgrade-windows-2019-2022.md",
2631
"redirect_url": "/azure/aks/upgrade-windows-os",

articles/aks/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@
9292
- name: Concepts
9393
items:
9494
- name: Core concepts
95-
href: concepts-clusters-workloads.md
95+
href: core-aks-concepts.md
9696
- name: Pricing tiers for AKS
9797
href: free-standard-pricing-tiers.md
9898
- name: Maintain and upgrade an AKS cluster
9999
href: upgrade.md
100+
- name: Resource reservations
101+
href: node-resource-reservations.md
100102
- name: Backup and recover cluster
101103
href: ../backup/azure-kubernetes-service-backup-overview.md?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json
102104
- name: Observability

articles/aks/concepts-clusters-workloads.md

Lines changed: 0 additions & 445 deletions
This file was deleted.

articles/aks/concepts-storage.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ This article introduces the core concepts that provide storage to your applicati
2828

2929
![Diagram of storage options for applications in an Azure Kubernetes Services (AKS) cluster.](media/concepts-storage/aks-storage-concept.png)
3030

31+
## Default OS disk sizing
32+
33+
When you create a new cluster or add a new node pool to an existing cluster, the number for vCPUs by default determines the OS disk size. The number of vCPUs is based on the VM SKU. The following table lists the default OS disk size for each VM SKU:
34+
35+
|VM SKU Cores (vCPUs)| Default OS Disk Tier | Provisioned IOPS | Provisioned Throughput (Mbps) |
36+
|--|--|--|--|
37+
| 1 - 7 | P10/128G | 500 | 100 |
38+
| 8 - 15 | P15/256G | 1100 | 125 |
39+
| 16 - 63 | P20/512G | 2300 | 150 |
40+
| 64+ | P30/1024G | 5000 | 200 |
41+
42+
> [!IMPORTANT]
43+
> Default OS disk sizing is only used on new clusters or node pools when Ephemeral OS disks aren't supported and a default OS disk size isn't specified. The default OS disk size might impact the performance or cost of your cluster. You can't change the OS disk size after cluster or node pool creation. This default disk sizing affects clusters or node pools created on July 2022 or later.
44+
3145
## Ephemeral OS disk
3246

3347
By default, Azure automatically replicates the operating system disk for a virtual machine to Azure Storage to avoid data loss when the VM is relocated to another host. However, since containers aren't designed to have local state persisted, this behavior offers limited value while providing some drawbacks. These drawbacks include, but aren't limited to, slower node provisioning and higher read/write latency.

articles/aks/core-aks-concepts.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
title: Azure Kubernetes Services (AKS) core concepts
3+
description: Learn about the core concepts of Azure Kubernetes Service (AKS).
4+
ms.topic: conceptual
5+
ms.date: 07/10/2024
6+
author: schaffererin
7+
ms.author: schaffererin
8+
---
9+
10+
# Core concepts for Azure Kubernetes Service (AKS)
11+
12+
This article describes core concepts of Azure Kubernetes Service (AKS), a managed Kubernetes service that you can use to deploy and operate containerized applications at scale on Azure.
13+
14+
## What is Kubernetes?
15+
16+
Kubernetes is an open-source container orchestration platform for automating the deployment, scaling, and management of containerized applications. For more information, see the official [Kubernetes documentation][kubernetes-docs].
17+
18+
## What is AKS?
19+
20+
AKS is a managed Kubernetes service that simplifies deploying, managing, and scaling containerized applications using Kubernetes. For more information, see [What is Azure Kubernetes Service (AKS)?][aks-overview]
21+
22+
## Cluster components
23+
24+
An AKS cluster is divided into two main components:
25+
26+
* **Control plane**: The control plane provides the core Kubernetes services and orchestration of application workloads.
27+
* **Nodes**: Nodes are the underlying virtual machines (VMs) that run your applications.
28+
29+
![Screenshot of Kubernetes control plane and node components](media/concepts-clusters-workloads/control-plane-and-nodes.png)
30+
31+
### Control plane
32+
33+
The Azure managed control plane is comprised of several components that help manage the cluster:
34+
35+
| Component | Description |
36+
| --------- | ----------- |
37+
| *kube-apiserver* | The API server ([kube-apiserver][kube-apiserver]) exposes the Kubernetes API to enable requests to the cluster from inside and outside of the cluster. |
38+
| *etcd* | [etcd][etcd] is a highly available key-value store that helps maintain the state of your Kubernetes cluster and configuration. |
39+
| *kube-scheduler* | The scheduler ([kube-scheduler][kube-scheduler]) helps make scheduling decisions, watching for new pods with no assigned node and selecting a node for them to run on. |
40+
| *kube-controller-manager* | The controller manager ([kube-controller-manager][kube-controller-manager]) runs controller processes, such as noticing and responding when nodes go down. |
41+
| *cloud-controller-manager* | The cloud controller manager ([cloud-controller-manager][cloud-controller-manager]) embeds cloud-specific control logic to run controllers specific to the cloud provider. |
42+
43+
### Nodes
44+
45+
Each AKS cluster has at least one node, which is an Azure virtual machine (VM) that runs Kubernetes node components. The following components run on each node:
46+
47+
| Component | Description |
48+
| --------- | ----------- |
49+
| *kubelet* | The [kubelet][kubelet] ensures that containers are running in a pod. |
50+
| *kube-proxy* | The [kube-proxy][kube-proxy] is a network proxy that maintains network rules on nodes. |
51+
| *container runtime* | The [container runtime][container-runtime] manages the execution and lifecycle of containers. |
52+
53+
![Screenshot of Azure virtual machine and supporting resources for a Kubernetes node](media/concepts-clusters-workloads/aks-node-resource-interactions.png)
54+
55+
## Node configuration
56+
57+
### VM size and image
58+
59+
The **Azure VM size** for your nodes defines CPUs, memory, size, and the storage type available, such as high-performance SSD or regular HDD. The VM size you choose depends on the workload requirements and the number of pods you plan to run on each node. For more information, see [Supported VM sizes in Azure Kubernetes Service (AKS)][aks-vm-sizes].
60+
61+
In AKS, the **VM image** for your cluster's nodes is based on Ubuntu Linux, [Azure Linux](use-azure-linux.md), or Windows Server 2022. When you create an AKS cluster or scale out the number of nodes, the Azure platform automatically creates and configures the requested number of VMs. Agent nodes are billed as standard VMs, so any VM size discounts, including [Azure reservations][reservation-discounts], are automatically applied.
62+
63+
### OS disks
64+
65+
Default OS disk sizing is only used on new clusters or node pools when Ephemeral OS disks aren't supported and a default OS disk size isn't specified. For more information, see [Default OS disk sizing][default-os-disk] and [Ephemeral OS disks][ephemeral-os-disks].
66+
67+
### Resource reservations
68+
69+
AKS uses node resources to help the nodes function as part of the cluster. This usage can cause a discrepancy between the node's total resources and the allocatable resources in AKS. To maintain node performance and functionality, AKS reserves two types of resources, **CPU** and **memory**, on each node. For more information, see [Resource reservations in AKS][resource-reservations].
70+
71+
### OS
72+
73+
AKS supports Ubuntu 22.04 and Azure Linux 2.0 as the node OS for Linux node pools. For Windows node pools, AKS supports Windows Server 2022 as the default OS. Windows Server 2019 is being retired after Kubernetes version 1.32 reaches end of life and isn't supported in future releases. If you need to upgrade your Windows OS version, see [Upgrade from Windows Server 2019 to Windows Server 2022][upgrade-2019-2022]. For more information on using Windows Server on AKS, see [Windows container considerations in Azure Kubernetes Service (AKS)][windows-considerations].
74+
75+
### Container runtime
76+
77+
A container runtime is software that executes containers and manages container images on a node. The runtime helps abstract away sys-calls or OS-specific functionality to run containers on Linux or Windows. For Linux node pools, [`containerd`][containerd] is used on Kubernetes version 1.19 and higher. For Windows Server 2019 and 2022 node pools, [`containerd`][containerd] is generally available and is the only runtime option on Kubernetes version 1.23 and higher.
78+
79+
## Pods
80+
81+
A *pod* is a group of one or more containers that share the same network and storage resources and a specification for how to run the containers. Pods typically have a 1:1 mapping with a container, but you can run multiple containers in a pod.
82+
83+
## Node pools
84+
85+
In AKS, nodes of the same configuration are grouped together into *node pools*. These node pools contain the underlying virtual machine scale sets and virtual machines (VMs) that run your applications. When you create an AKS cluster, you define the initial number of nodes and their size (SKU), which creates a [*system node pool*][use-system-pool]. System node pools serve the primary purpose of hosting critical system pods, such as CoreDNS and `konnectivity`. To support applications that have different compute or storage demands, you can create *user node pools*. User node pools serve the primary purpose of hosting your application pods.
86+
87+
For more information, see [Create node pools in AKS][create-node-pools] and [Manage node pools in AKS][manage-node-pools].
88+
89+
## Node resource group
90+
91+
When you create an AKS cluster in an Azure resource group, the AKS resource provider automatically creates a second resource group called the *node resource group*. This resource group contains all the infrastructure resources associated with the cluster, including virtual machines (VMs), virtual machine scale sets, and storage.
92+
93+
For more information, see the following resources:
94+
95+
* [Why are two resource groups created with AKS?][node-resource-group]
96+
* [Can I provide my own name for the AKS node resource group?][custom-nrg]
97+
* [Can I modify tags and other properties of the resources in the AKS node resource group?][modify-nrg-resources]
98+
99+
## Namespaces
100+
101+
Kubernetes resources, such as pods and deployments, are logically grouped into *namespaces* to divide an AKS cluster and create, view, or manage access to resources.
102+
103+
The following namespaces are created by default in an AKS cluster:
104+
105+
| Namespace | Description |
106+
| --------- | ----------- |
107+
| *default* | The [default][kubernetes-namespaces] namespace allows you to start using cluster resources without creating a new namespace. |
108+
| *kube-node-lease* | The [kube-node-lease][kubernetes-namespaces] namespace enables nodes to communicate their availability to the control plane. |
109+
| *kube-public* | The [kube-public][kubernetes-namespaces] namespace isn't typically used, but can be used for resources to be visible across the whole cluster by any user. |
110+
| *kube-system* | The [kube-system][kubernetes-namespaces] namespace is used by Kubernetes to manage cluster resources, such as `coredns`, `konnectivity-agent`, and `metrics-server`. |
111+
112+
![Screenshot of Kubernetes namespaces to logically divide resources and applications](media/concepts-clusters-workloads/namespaces.png)
113+
114+
## Cluster modes
115+
116+
In AKS, you can create a cluster with the **Automatic (preview)** or **Standard** mode. AKS Automatic provides a more fully managed experience, managing cluster configuration, including nodes, scaling, security, and other preconfigured settings. AKS Standard provides more control over the cluster configuration, including the ability to manage node pools, scaling, and other settings.
117+
118+
For more information, see [AKS Automatic and Standard feature comparison][automatic-standard].
119+
120+
## Pricing tiers
121+
122+
AKS offers three pricing tiers for cluster management: **Free**, **Standard**, and **Premium**. The pricing tier you choose determines the features available for managing your cluster.
123+
124+
For more information, see [Pricing tiers for AKS cluster management][pricing-tiers].
125+
126+
## Supported Kubernetes versions
127+
128+
For more information, see [Supported Kubernetes versions in AKS][supported-kubernetes-versions].
129+
130+
## Next steps
131+
132+
For information on more core concepts for AKS, see the following resources:
133+
134+
* [AKS access and identity][access-identity]
135+
* [AKS security][security]
136+
* [AKS networking][networking]
137+
* [AKS storage][storage]
138+
* [AKS scaling][scaling]
139+
* [AKS monitoring][monitoring]
140+
* [AKS backup and recovery][backup-recovery]
141+
142+
<!---LINKS--->
143+
[kube-apiserver]: https://kubernetes.io/docs/concepts/overview/components/#kube-apiserver
144+
[etcd]: https://kubernetes.io/docs/concepts/overview/components/#etcd
145+
[kube-scheduler]: https://kubernetes.io/docs/concepts/overview/components/#kube-scheduler
146+
[kube-controller-manager]: https://kubernetes.io/docs/concepts/overview/components/#kube-controller-manager
147+
[cloud-controller-manager]: https://kubernetes.io/docs/concepts/overview/components/#cloud-controller-manager
148+
[kubelet]: https://kubernetes.io/docs/concepts/overview/components/#kubelet
149+
[kube-proxy]: https://kubernetes.io/docs/concepts/overview/components/#kube-proxy
150+
[container-runtime]: https://kubernetes.io/docs/concepts/overview/components/#container-runtime
151+
[create-node-pools]: ./create-node-pools.md
152+
[manage-node-pools]: ./manage-node-pools.md
153+
[node-resource-group]: ./faq.md#why-are-two-resource-groups-created-with-aks
154+
[custom-nrg]: ./faq.md#can-i-provide-my-own-name-for-the-aks-node-resource-group
155+
[modify-nrg-resources]: ./faq.md#can-i-modify-tags-and-other-properties-of-the-aks-resources-in-the-node-resource-group
156+
[kubernetes-namespaces]: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#initial-namespaces
157+
[use-system-pool]: ./use-system-pools.md
158+
[automatic-standard]: ./intro-aks-automatic.md#aks-automatic-and-standard-feature-comparison
159+
[pricing-tiers]: ./free-standard-pricing-tiers.md
160+
[access-identity]: ./concepts-identity.md
161+
[security]: ./concepts-security.md
162+
[networking]: ./concepts-network.md
163+
[storage]: ./concepts-storage.md
164+
[scaling]: ./concepts-scale.md
165+
[monitoring]: ./monitor-aks.md
166+
[backup-recovery]: ../backup/azure-kubernetes-service-backup-overview.md
167+
[kubernetes-docs]: https://kubernetes.io/docs/home/
168+
[resource-reservations]: ./node-resource-reservations.md
169+
[reservation-discounts]: ../cost-management-billing/reservations/save-compute-costs-reservations.md
170+
[supported-kubernetes-versions]: ./supported-kubernetes-versions.md
171+
[default-os-disk]: ./concepts-storage.md#default-os-disk-sizing
172+
[ephemeral-os-disks]: ./concepts-storage.md#ephemeral-os-disk
173+
[aks-overview]: ./what-is-aks.md
174+
[containerd]: https://containerd.io/
175+
[aks-vm-sizes]: ./quotas-skus-regions.md#supported-vm-sizes
176+
[windows-considerations]: ./windows-vs-linux-containers.md
177+
[upgrade-2019-2022]: ./upgrade-windows-os.md
32.1 KB
Loading
52.9 KB
Loading
34.3 KB
Loading
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Node resource reservations in Azure Kubernetes Service (AKS)
3+
description: Learn about node resource reservations in Azure Kubernetes Service (AKS).
4+
ms.topic: how-to
5+
ms.service: azure-kubernetes-service
6+
ms.date: 04/16/2024
7+
ms.author: schaffererin
8+
author: schaffererin
9+
---
10+
11+
# Node resource reservations in Azure Kubernetes Service (AKS)
12+
13+
In this article, you learn about node resource reservations in Azure Kubernetes Service (AKS).
14+
15+
## Resource reservations
16+
17+
AKS uses node resources to help the nodes function as part of the cluster. This usage can cause a discrepancy between the node's total resources and the allocatable resources in AKS.
18+
19+
AKS reserves two types of resources, **CPU** and **memory**, on each node to maintain node performance and functionality. As a node grows larger in resources, the resource reservations also grow due to a higher need for management of user-deployed pods. Keep in mind that you can't change resource reservations on a node.
20+
21+
### CPU reservations
22+
23+
Reserved CPU is dependent on node type and cluster configuration, which might result in less allocatable CPU due to running extra features. The following table shows CPU reservations in millicores:
24+
25+
| CPU cores on host | 1 core | 2 cores | 4 cores | 8 cores | 16 cores | 32 cores | 64 cores |
26+
| ----------------- | ------ | ------- | ------- | ------- | -------- | -------- | -------- |
27+
| Kube-reserved CPU (millicores) | 60 | 100 | 140 | 180 | 260 | 420 | 740 |
28+
29+
### Memory reservations
30+
31+
In AKS, reserved memory consists of the sum of two values:
32+
33+
**AKS 1.29 and later**
34+
35+
* **`kubelet` daemon** has the *memory.available < 100 Mi* eviction rule by default. This rule ensures that a node has at least 100 Mi allocatable at all times. When a host is below that available memory threshold, the `kubelet` triggers the termination of one of the running pods and frees up memory on the host machine.
36+
* **A rate of memory reservations** set according to the lesser value of: *20 MB * Max Pods supported on the Node + 50 MB* or *25% of the total system memory resources*.
37+
38+
**Examples**:
39+
* If the virtual machine (VM) provides 8 GB of memory and the node supports up to 30 pods, AKS reserves *20 MB * 30 Max Pods + 50 MB = 650 MB* for kube-reserved. `Allocatable space = 8 GB - 0.65 GB (kube-reserved) - 0.1 GB (eviction threshold) = 7.25 GB or 90.625% allocatable.`
40+
* If the VM provides 4 GB of memory and the node supports up to 70 pods, AKS reserves *25% * 4 GB = 1000 MB* for kube-reserved, as this is less than *20 MB * 70 Max Pods + 50 MB = 1450 MB*.
41+
42+
For more information, see [Configure maximum pods per node in an AKS cluster][maximum-pods].
43+
44+
**AKS versions prior to 1.29**
45+
46+
* **`kubelet` daemon** has the *memory.available < 750 Mi* eviction rule by default. This rule ensures that a node has at least 750 Mi allocatable at all times. When a host is below that available memory threshold, the `kubelet` triggers the termination of one of the running pods and free up memory on the host machine.
47+
* **A regressive rate of memory reservations** for the kubelet daemon to properly function (*kube-reserved*).
48+
* 25% of the first 4 GB of memory
49+
* 20% of the next 4 GB of memory (up to 8 GB)
50+
* 10% of the next 8 GB of memory (up to 16 GB)
51+
* 6% of the next 112 GB of memory (up to 128 GB)
52+
* 2% of any memory more than 128 GB
53+
54+
> [!NOTE]
55+
> AKS reserves an extra 2 GB for system processes in Windows nodes that isn't part of the calculated memory.
56+
57+
Memory and CPU allocation rules are designed to:
58+
59+
* Keep agent nodes healthy, including some hosting system pods critical to cluster health.
60+
* Cause the node to report less allocatable memory and CPU than it would report if it weren't part of a Kubernetes cluster.
61+
62+
For example, if a node offers 7 GB, it reports 34% of memory not allocatable including the 750 Mi hard eviction threshold.
63+
64+
`0.75 + (0.25*4) + (0.20*3) = 0.75 GB + 1 GB + 0.6 GB = 2.35 GB / 7 GB = 33.57% reserved`
65+
66+
In addition to reservations for Kubernetes itself, the underlying node OS also reserves an amount of CPU and memory resources to maintain OS functions.
67+
68+
For associated best practices, see [Best practices for basic scheduler features in AKS][operator-best-practices-scheduler].
69+
70+
## Next steps
71+
72+
<!---LINKS--->
73+
[operator-best-practices-scheduler]: operator-best-practices-scheduler.md
74+
[maximum-pods]: concepts-network-ip-address-planning.md#maximum-pods-per-node

0 commit comments

Comments
 (0)