Skip to content

Commit 8e9a7cc

Browse files
authored
Merge pull request #271564 from tamram/tamram-251126
new PR: AKS Move Az Disk PV article
2 parents 7ceca23 + dffc179 commit 8e9a7cc

File tree

3 files changed

+287
-47
lines changed

3 files changed

+287
-47
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@
570570
href: use-ultra-disks.md
571571
- name: Bring your own keys for disks
572572
href: azure-disk-customer-managed-keys.md
573+
- name: Move a persistent volume between clusters
574+
href: csi-disk-move-subscriptions.md
573575
- name: Use Azure Container Storage with Azure Disks
574576
href: ../storage/container-storage/use-container-storage-with-managed-disks.md?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json
575577
- name: Azure Elastic SAN

articles/aks/concepts-storage.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
title: Concepts - Storage in Azure Kubernetes Services (AKS)
33
description: Learn about storage in Azure Kubernetes Service (AKS), including volumes, persistent volumes, storage classes, and claims.
44
ms.topic: conceptual
5-
ms.date: 03/19/2024
5+
ms.date: 05/02/2024
66
author: tamram
77
ms.author: tamram
8-
98
ms.subservice: aks-storage
109
---
1110

@@ -31,7 +30,7 @@ This article introduces the core concepts that provide storage to your applicati
3130

3231
## Ephemeral OS disk
3332

34-
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.
33+
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.
3534

3635
By contrast, ephemeral OS disks are stored only on the host machine, just like a temporary disk. With this configuration, you get lower read/write latency, together with faster node scaling and cluster upgrades.
3736

@@ -72,19 +71,19 @@ To help determine best fit for your workload between Azure Files and Azure NetAp
7271

7372
Use [Azure Disk][azure-disk-csi] to create a Kubernetes *DataDisk* resource. Disks types include:
7473

75-
* Ultra Disks
76-
* Premium SSDs
74+
* Premium SSDs (recommended for most workloads)
75+
* Ultra disks
7776
* Standard SSDs
7877
* Standard HDDs
7978

8079
> [!TIP]
81-
> For most production and development workloads, use Premium SSD.
80+
> For most production and development workloads, use Premium SSDs.
8281
83-
Because Azure Disk is mounted as *ReadWriteOnce*, they're only available to a single node. For storage volumes accessible by pods on multiple nodes simultaneously, use Azure Files.
82+
Because an Azure Disk is mounted as *ReadWriteOnce*, it's only available to a single node. For storage volumes accessible by pods on multiple nodes simultaneously, use Azure Files.
8483

8584
### Azure Files
8685

87-
Use [Azure Files][azure-files-csi] to mount a Server Message Block (SMB) version 3.1.1 share or Network File System (NFS) version 4.1 share backed by an Azure storage account to pods. Azure Files let you share data across multiple nodes and pods and can use:
86+
Use [Azure Files][azure-files-csi] to mount a Server Message Block (SMB) version 3.1.1 share or Network File System (NFS) version 4.1 share. Azure Files let you share data across multiple nodes and pods and can use:
8887

8988
* Azure Premium storage backed by high-performance SSDs
9089
* Azure Standard storage backed by regular HDDs
@@ -99,11 +98,11 @@ Use [Azure Files][azure-files-csi] to mount a Server Message Block (SMB) version
9998

10099
Use [Azure Blob Storage][azure-blob-csi] to create a blob storage container and mount it using the NFS v3.0 protocol or BlobFuse.
101100

102-
* Block Blobs
101+
* Block blobs
103102

104103
### Volume types
105104

106-
Kubernetes volumes represent more than just a traditional disk for storing and retrieving information. Kubernetes volumes can also be used as a way to inject data into a pod for use by the containers.
105+
Kubernetes volumes represent more than just a traditional disk for storing and retrieving information. Kubernetes volumes can also be used as a way to inject data into a pod for use by its containers.
107106

108107
Common volume types in Kubernetes include:
109108

@@ -115,11 +114,11 @@ Commonly used as temporary space for a pod. All containers within a pod can acce
115114

116115
You can use *secret* volumes to inject sensitive data into pods, such as passwords.
117116

118-
1. Create a Secret using the Kubernetes API.
119-
1. Define your pod or deployment and request a specific Secret.
117+
1. Create a secret using the Kubernetes API.
118+
1. Define your pod or deployment and request a specific secret.
120119
* Secrets are only provided to nodes with a scheduled pod that requires them.
121-
* The Secret is stored in *tmpfs*, not written to disk.
122-
1. When you delete the last pod on a node requiring a Secret, the Secret is deleted from the node's tmpfs.
120+
* The secret is stored in *tmpfs*, not written to disk.
121+
1. When you delete the last pod on a node requiring a secret, the secret is deleted from the node's tmpfs.
123122
* Secrets are stored within a given namespace and are only accessed by pods within the same namespace.
124123

125124
#### configMap
@@ -136,46 +135,46 @@ Like using a secret:
136135

137136
Volumes defined and created as part of the pod lifecycle only exist until you delete the pod. Pods often expect their storage to remain if a pod is rescheduled on a different host during a maintenance event, especially in StatefulSets. A *persistent volume* (PV) is a storage resource created and managed by the Kubernetes API that can exist beyond the lifetime of an individual pod.
138137

139-
You can use the following Azure Storage data services to provide the PersistentVolume:
138+
You can use the following Azure Storage data services to provide the persistent volume:
140139

141140
* [Azure Disk](azure-csi-disk-storage-provision.md)
142141
* [Azure Files](azure-csi-files-storage-provision.md)
143142
* [Azure Container Storage][azure-container-storage] (preview).
144143

145-
As noted in the [Volumes](#volumes) section, the choice of Disks or Files is often determined by the need for concurrent access to the data or the performance tier.
144+
As noted in the [Volumes](#volumes) section, the choice of Azure Disks or Azure Files is often determined by the need for concurrent access to the data or the performance tier.
146145

147146
![Diagram of persistent volumes in an Azure Kubernetes Services (AKS) cluster.](media/concepts-storage/aks-storage-persistent-volume.png)
148147

149-
A cluster administrator can *statically* create a PersistentVolume, or the volume is created *dynamically* by the Kubernetes API server. If a pod is scheduled and requests currently unavailable storage, Kubernetes can create the underlying Azure Disk or File storage and attach it to the pod. Dynamic provisioning uses a *StorageClass* to identify what type of Azure storage needs to be created.
148+
A cluster administrator can *statically* create a persistent volume, or a volume can be created *dynamically* by the Kubernetes API server. If a pod is scheduled and requests storage that is currently unavailable, Kubernetes can create the underlying Azure Disk or File storage and attach it to the pod. Dynamic provisioning uses a *storage class* to identify what type of resource needs to be created.
150149

151150
> [!IMPORTANT]
152151
> Persistent volumes can't be shared by Windows and Linux pods due to differences in file system support between the two operating systems.
153152
154153
## Storage classes
155154

156-
To define different tiers of storage, such as Premium and Standard, you can create a *StorageClass*.
155+
To specify different tiers of storage, such as premium or standard, you can create a *storage class*.
157156

158-
The StorageClass also defines the *reclaimPolicy*. When you delete the persistent volume, the reclaimPolicy controls the behavior of the underlying Azure storage resource. The underlying storage resource can either be deleted or kept for use with a future pod.
157+
A storage class also defines a *reclaim policy*. When you delete the persistent volume, the reclaim policy controls the behavior of the underlying Azure Storage resource. The underlying resource can either be deleted or kept for use with a future pod.
159158

160-
For clusters using the [Container Storage Interface (CSI) drivers][csi-storage-drivers] the following extra `StorageClasses` are created:
159+
For clusters using the [Container Storage Interface (CSI) drivers][csi-storage-drivers] the following extra storage classes are created:
161160

162161
| Storage class | Description |
163162
|---|---|
164-
| `managed-csi` | Uses Azure StandardSSD locally redundant storage (LRS) to create a Managed Disk. The reclaim policy ensures that the underlying Azure Disk is deleted when the persistent volume that used it's deleted. The storage class also configures the persistent volumes to be expandable, you just need to edit the persistent volume claim with the new size. |
165-
| `managed-csi-premium` | Uses Azure Premium locally redundant storage (LRS) to create a Managed Disk. The reclaim policy again ensures that the underlying Azure Disk is deleted when the persistent volume that used it's deleted. Similarly, this storage class allows for persistent volumes to be expanded. |
163+
| `managed-csi` | Uses Azure Standard SSD locally redundant storage (LRS) to create a managed disk. The reclaim policy ensures that the underlying Azure Disk is deleted when the persistent volume that used it is deleted. The storage class also configures the persistent volumes to be expandable. You can edit the persistent volume claim to specify the new size. |
164+
| `managed-csi-premium` | Uses Azure Premium locally redundant storage (LRS) to create a managed disk. The reclaim policy again ensures that the underlying Azure Disk is deleted when the persistent volume that used it is deleted. Similarly, this storage class allows for persistent volumes to be expanded. |
166165
| `azurefile-csi` | Uses Azure Standard storage to create an Azure file share. The reclaim policy ensures that the underlying Azure file share is deleted when the persistent volume that used it is deleted. |
167-
| `azurefile-csi-premium` | Uses Azure Premium storage to create an Azure file share. The reclaim policy ensures that the underlying Azure file share is deleted when the persistent volume that used it's deleted.|
168-
| `azureblob-nfs-premium` | Uses Azure Premium storage to create an Azure Blob storage container and connect using the NFS v3 protocol. The reclaim policy ensures that the underlying Azure Blob storage container is deleted when the persistent volume that used it's deleted. |
169-
| `azureblob-fuse-premium` | Uses Azure Premium storage to create an Azure Blob storage container and connect using BlobFuse. The reclaim policy ensures that the underlying Azure Blob storage container is deleted when the persistent volume that used it's deleted. |
166+
| `azurefile-csi-premium` | Uses Azure Premium storage to create an Azure file share. The reclaim policy ensures that the underlying Azure file share is deleted when the persistent volume that used it is deleted.|
167+
| `azureblob-nfs-premium` | Uses Azure Premium storage to create an Azure Blob storage container and connect using the NFS v3 protocol. The reclaim policy ensures that the underlying Azure Blob storage container is deleted when the persistent volume that used it is deleted. |
168+
| `azureblob-fuse-premium` | Uses Azure Premium storage to create an Azure Blob storage container and connect using BlobFuse. The reclaim policy ensures that the underlying Azure Blob storage container is deleted when the persistent volume that used it is deleted. |
170169

171-
Unless you specify a StorageClass for a persistent volume, the default StorageClass is used. Ensure volumes use the appropriate storage you need when requesting persistent volumes.
170+
Unless you specify a storage class for a persistent volume, the default storage class is used. Ensure volumes use the appropriate storage you need when requesting persistent volumes.
172171

173172
> [!IMPORTANT]
174173
> Starting with Kubernetes version 1.21, AKS only uses CSI drivers by default and CSI migration is enabled. While existing in-tree persistent volumes continue to function, starting with version 1.26, AKS will no longer support volumes created using in-tree driver and storage provisioned for files and disk.
175174
>
176175
> The `default` class will be the same as `managed-csi`.
177176
178-
You can create a StorageClass for other needs using `kubectl`. The following example uses Premium Managed Disks and specifies that the underlying Azure Disk should be *retained* when you delete the pod:
177+
You can create a storage class for other needs using `kubectl`. The following example uses premium managed disks and specifies that the underlying Azure Disk should be *retained* when you delete the pod:
179178

180179
```yaml
181180
apiVersion: storage.k8s.io/v1
@@ -197,15 +196,15 @@ For more information about storage classes, see [StorageClass in Kubernetes](htt
197196
198197
## Persistent volume claims
199198
200-
A PersistentVolumeClaim requests storage of a particular StorageClass, access mode, and size. The Kubernetes API server can dynamically provision the underlying Azure storage resource if no existing resource can fulfill the claim based on the defined StorageClass.
199+
A persistent volume claim (PVC) requests storage of a particular storage class, access mode, and size. The Kubernetes API server can dynamically provision the underlying Azure Storage resource if no existing resource can fulfill the claim based on the defined storage class.
201200
202201
The pod definition includes the volume mount once the volume has been connected to the pod.
203202
204203
![Diagram of persistent volume claims in an Azure Kubernetes Services (AKS) cluster.](media/concepts-storage/aks-storage-persistent-volume-claim.png)
205204
206-
Once an available storage resource has been assigned to the pod requesting storage, PersistentVolume is *bound* to a PersistentVolumeClaim. Persistent volumes are 1:1 mapped to claims.
205+
Once an available storage resource has been assigned to the pod requesting storage, the persistent volume is *bound* to a persistent volume claim. Persistent volumes are mapped to claims in a 1:1 mapping.
207206
208-
The following example YAML manifest shows a persistent volume claim that uses the *managed-premium* StorageClass and requests a Disk *5Gi* in size:
207+
The following example YAML manifest shows a persistent volume claim that uses the *managed-premium* storage class and requests an Azure Disk that is *5Gi* in size:
209208
210209
```yaml
211210
apiVersion: v1
@@ -224,7 +223,7 @@ spec:
224223
When you create a pod definition, you also specify:
225224
226225
* The persistent volume claim to request the desired storage.
227-
* The *volumeMount* for your applications to read and write data.
226+
* The *volume mount* for your applications to read and write data.
228227
229228
The following example YAML manifest shows how the previous persistent volume claim can be used to mount a volume at */mnt/azure*:
230229
@@ -250,11 +249,11 @@ For mounting a volume in a Windows container, specify the drive letter and path.
250249
251250
```yaml
252251
...
253-
volumeMounts:
254-
- mountPath: "d:"
255-
name: volume
256-
- mountPath: "c:\k"
257-
name: k-dir
252+
volumeMounts:
253+
- mountPath: "d:"
254+
name: volume
255+
- mountPath: "c:\k"
256+
name: k-dir
258257
...
259258
```
260259

@@ -264,19 +263,19 @@ For associated best practices, see [Best practices for storage and backups in AK
264263

265264
To see how to use CSI drivers, see the following how-to articles:
266265

267-
- [Container Storage Interface (CSI) drivers for Azure Disk, Azure Files, and Azure Blob storage on Azure Kubernetes Service][csi-storage-drivers]
268-
- [Use Azure Disk CSI driver in Azure Kubernetes Service][azure-disk-csi]
269-
- [Use Azure Files CSI driver in Azure Kubernetes Service][azure-files-csi]
270-
- [Use Azure Blob storage CSI driver in Azure Kubernetes Service][azure-blob-csi]
271-
- [Configure Azure NetApp Files with Azure Kubernetes Service][azure-netapp-files]
266+
* [Container Storage Interface (CSI) drivers for Azure Disk, Azure Files, and Azure Blob storage on Azure Kubernetes Service][csi-storage-drivers]
267+
* [Use Azure Disk CSI driver in Azure Kubernetes Service][azure-disk-csi]
268+
* [Use Azure Files CSI driver in Azure Kubernetes Service][azure-files-csi]
269+
* [Use Azure Blob storage CSI driver in Azure Kubernetes Service][azure-blob-csi]
270+
* [Configure Azure NetApp Files with Azure Kubernetes Service][azure-netapp-files]
272271

273272
For more information on core Kubernetes and AKS concepts, see the following articles:
274273

275-
- [Kubernetes / AKS clusters and workloads][aks-concepts-clusters-workloads]
276-
- [Kubernetes / AKS identity][aks-concepts-identity]
277-
- [Kubernetes / AKS security][aks-concepts-security]
278-
- [Kubernetes / AKS virtual networks][aks-concepts-network]
279-
- [Kubernetes / AKS scale][aks-concepts-scale]
274+
* [Kubernetes / AKS clusters and workloads][aks-concepts-clusters-workloads]
275+
* [Kubernetes / AKS identity][aks-concepts-identity]
276+
* [Kubernetes / AKS security][aks-concepts-security]
277+
* [Kubernetes / AKS virtual networks][aks-concepts-network]
278+
* [Kubernetes / AKS scale][aks-concepts-scale]
280279

281280
<!-- EXTERNAL LINKS -->
282281

@@ -303,4 +302,3 @@ For more information on core Kubernetes and AKS concepts, see the following arti
303302
[azure-disk-customer-managed-key]: azure-disk-customer-managed-keys.md
304303
[azure-aks-storage-considerations]: /azure/cloud-adoption-framework/scenarios/app-platform/aks/storage
305304
[azure-container-storage]: ../storage/container-storage/container-storage-introduction.md
306-

0 commit comments

Comments
 (0)