Skip to content

Commit 19359dc

Browse files
authored
Merge pull request #231847 from MGoedtel/task62949
New AKS Storage How-to Article
2 parents 3a6a973 + 778e661 commit 19359dc

File tree

4 files changed

+229
-40
lines changed

4 files changed

+229
-40
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@
500500
href: azure-disk-csi.md
501501
- name: Provision Azure Disks storage
502502
href: azure-csi-disk-storage-provision.md
503+
- name: Use Azure Premium SSD v2 disks
504+
href: use-premium-v2-disks.md
503505
- name: Use Azure ultra disks
504506
href: use-ultra-disks.md
505507
- name: Other storage options

articles/aks/azure-netapp-files.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ This section walks you through the installation of Astra Trident using the opera
370370
1. Before creating a backend, you need to update [backend-anf.yaml][backend-anf.yaml] to include details about the Azure NetApp Files subscription, such as:
371371
372372
* `subscriptionID` for the Azure subscription where Azure NetApp Files will be enabled.
373-
* `tenantID`, `clientID`, and `clientSecret` from an [App Registration][azure-ad-app-registration] in Azure Active Directory (AD) with sufficient permissions for the Azure NetApp Files service. The App Registration include the `Owner` or `Contributor` role that's predefined by Azure.
373+
* `tenantID`, `clientID`, and `clientSecret` from an [App Registration][azure-ad-app-registration] in Azure Active Directory (AD) with sufficient permissions for the Azure NetApp Files service. The App Registration includes the `Owner` or `Contributor` role that's predefined by Azure.
374374
* An Azure location that contains at least one delegated subnet.
375375
376376
In addition, you can choose to provide a different service level. Azure NetApp Files provides three [service levels](../azure-netapp-files/azure-netapp-files-service-levels.md): Standard, Premium, and Ultra.
@@ -411,7 +411,7 @@ A storage class is used to define how a unit of storage is dynamically created w
411411
kubectl apply -f anf-storageclass.yaml
412412
```
413413
414-
The output of the command resembles the following example::
414+
The output of the command resembles the following example:
415415
416416
```console
417417
storageclass/azure-netapp-files created
@@ -544,10 +544,6 @@ After the PVC is created, a pod can be spun up to access the Azure NetApp Files
544544
Normal Started 10s kubelet Started container nginx
545545
```
546546
547-
## Using Azure tags
548-
549-
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
550-
551547
## Next steps
552548
553549
Astra Trident supports many features with Azure NetApp Files. For more information, see:

articles/aks/use-premium-v2-disks.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
title: Enable Premium SSD v2 Disk support on Azure Kubernetes Service (AKS)
3+
description: Learn how to enable and configure Premium SSD v2 Disks in an Azure Kubernetes Service (AKS) cluster.
4+
ms.topic: article
5+
ms.date: 04/25/2023
6+
7+
---
8+
9+
# Use Azure Premium SSD v2 disks on Azure Kubernetes Service
10+
11+
[Azure Premium SSD v2 disks][azure-premium-v2-disk-overview] offer IO-intense enterprise workloads, a consistent submillisecond disk latency, and high IOPS and throughput. The performance (capacity, throughput, and IOPS) of Premium SSD v2 disks can be independently configured at any time, making it easier for more scenarios to be cost efficient while meeting performance needs.
12+
13+
This article describes how to configure a new or existing AKS cluster to use Azure Premium SSD v2 disks.
14+
15+
## Before you begin
16+
17+
Before creating or upgrading an AKS cluster that is able to use Azure Premium SSD v2 disks, you need to create an AKS cluster in the same region and availability zone that supports Premium Storage and attach the disks following the steps below.
18+
19+
For an existing AKS cluster, you can enable Premium SSD v2 disks by adding a new node pool to your cluster, and then attach the disks following the steps below.
20+
21+
> [!IMPORTANT]
22+
> Azure Premium SSD v2 disks require node pools deployed in regions that support these disks. For a list of supported regions, see [Premium SSD v2 disk supported regions][premium-v2-regions].
23+
24+
### Limitations
25+
26+
- Azure Premium SSD v2 disks have certain limitations that you need to be aware of. For a complete list, see [Premium SSD v2 limitations][premium-v2-limitations].
27+
28+
## Use Premium SSD v2 disks dynamically with a storage class
29+
30+
To use Premium SSD v2 disks in a deployment or stateful set, you can use a [storage class for dynamic provisioning][azure-disk-volume].
31+
32+
### Create the storage class
33+
34+
A storage class is used to define how a unit of storage is dynamically created with a persistent volume. For more information on Kubernetes storage classes, see [Kubernetes Storage Classes][kubernetes-storage-classes].
35+
36+
In this example, you create a storage class that references Premium SSD v2 disks. Create a file named `azure-pv2-disk-sc.yaml`, and copy in the following manifest.
37+
38+
```yaml
39+
apiVersion: storage.k8s.io/v1
40+
kind: StorageClass
41+
metadata:
42+
name: premium2-disk-sc
43+
parameters:
44+
cachingMode: None
45+
skuName: PremiumV2_LRS
46+
DiskIOPSReadWrite: "4000"
47+
DiskMBpsReadWrite: "1000"
48+
provisioner: disk.csi.azure.com
49+
reclaimPolicy: Delete
50+
volumeBindingMode: Immediate
51+
allowVolumeExpansion: true
52+
```
53+
54+
Create the storage class with the [kubectl apply][kubectl-apply] command and specify your *azure-pv2-disk-sc.yaml* file:
55+
56+
```bash
57+
kubectl apply -f azure-pv2-disk-sc.yaml
58+
```
59+
60+
The output from the command resembles the following example:
61+
62+
```console
63+
storageclass.storage.k8s.io/premium2-disk-sc created
64+
```
65+
66+
## Create a persistent volume claim
67+
68+
A persistent volume claim (PVC) is used to automatically provision storage based on a storage class. In this case, a PVC can use the previously created storage class to create an ultra disk.
69+
70+
Create a file named `azure-pv2-disk-pvc.yaml`, and copy in the following manifest. The claim requests a disk named `premium2-disk` that is *1000 GB* in size with *ReadWriteOnce* access. The *premium2-disk-sc* storage class is specified as the storage class.
71+
72+
```yaml
73+
apiVersion: v1
74+
kind: PersistentVolumeClaim
75+
metadata:
76+
name: premium2-disk
77+
spec:
78+
accessModes:
79+
- ReadWriteOnce
80+
storageClassName: premium2-disk-sc
81+
resources:
82+
requests:
83+
storage: 1000Gi
84+
```
85+
86+
Create the persistent volume claim with the [kubectl apply][kubectl-apply] command and specify your *azure-pv2-disk-pvc.yaml* file:
87+
88+
```bash
89+
kubectl apply -f azure-pv2-disk-pvc.yaml
90+
```
91+
92+
The output from the command resembles the following example:
93+
94+
```console
95+
persistentvolumeclaim/premium2-disk created
96+
```
97+
98+
## Use the persistent volume
99+
100+
Once the persistent volume claim has been created and the disk successfully provisioned, a pod can be created with access to the disk. The following manifest creates a basic NGINX pod that uses the persistent volume claim named *premium2-disk* to mount the Azure disk at the path `/mnt/azure`.
101+
102+
Create a file named `nginx-premium2.yaml`, and copy in the following manifest.
103+
104+
```yaml
105+
kind: Pod
106+
apiVersion: v1
107+
metadata:
108+
name: nginx-premium2
109+
spec:
110+
containers:
111+
- name: nginx-premium2
112+
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
113+
resources:
114+
requests:
115+
cpu: 100m
116+
memory: 128Mi
117+
limits:
118+
cpu: 250m
119+
memory: 256Mi
120+
volumeMounts:
121+
- mountPath: "/mnt/azure"
122+
name: volume
123+
volumes:
124+
- name: volume
125+
persistentVolumeClaim:
126+
claimName: premium2-disk
127+
```
128+
129+
Create the pod with the [kubectl apply][kubectl-apply] command, as shown in the following example:
130+
131+
```bash
132+
kubectl apply -f nginx-premium2.yaml
133+
```
134+
135+
The output from the command resembles the following example:
136+
137+
```bash
138+
pod/nginx-premium2 created
139+
```
140+
141+
You now have a running pod with your Azure disk mounted in the `/mnt/azure` directory. This configuration can be seen when inspecting your pod via `kubectl describe pod nginx-premium2`, as shown in the following condensed example:
142+
143+
```bash
144+
kubectl describe pod nginx-premium2
145+
146+
[...]
147+
Volumes:
148+
volume:
149+
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
150+
ClaimName: premium2-disk
151+
ReadOnly: false
152+
kube-api-access-sh59b:
153+
Type: Projected (a volume that contains injected data from multiple sources)
154+
TokenExpirationSeconds: 3607
155+
ConfigMapName: kube-root-ca.crt
156+
ConfigMapOptional: <nil>
157+
DownwardAPI: true
158+
QoS Class: Burstable
159+
Node-Selectors: <none>
160+
Tolerations: node.kubernetes.io/memory-pressure:NoSchedule op=Exists
161+
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
162+
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
163+
Events:
164+
Type Reason Age From Message
165+
---- ------ ---- ---- -------
166+
Normal Scheduled 7m58s default-scheduler Successfully assigned default/nginx-premium2 to aks-agentpool-12254644-vmss000006
167+
Normal SuccessfulAttachVolume 7m46s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-ff39fb64-1189-4c52-9a24-e065b855b886"
168+
Normal Pulling 7m39s kubelet Pulling image "mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine"
169+
Normal Pulled 7m38s kubelet Successfully pulled image "mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine" in 1.192915667s
170+
Normal Created 7m38s kubelet Created container nginx-premium2
171+
Normal Started 7m38s kubelet Started container nginx-premium2
172+
[...]
173+
```
174+
175+
## Set IOPS and throughput limits
176+
177+
Input/Output Operations Per Second (IOPS) and throughput limits for Azure Premium v2 SSD disk is currently not supported through AKS. To adjust performance, you can use the Azure CLI command [az disk update][az-disk-update] and including the `--disk-iops-read-write` and `--disk-mbps-read-write` parameters.
178+
179+
The following example updates the disk IOPS read/write to **5000** and Mbps to **200**. For `--resource-group`, the value must be the second resource group automatically created to store the AKS worker nodes with the naming convention *MC_resourcegroupname_clustername_location*. For more information, see [Why are two resource groups created with AKS?][aks-two-resource-groups].
180+
181+
The value for the `--name` parameter is the name of the volume created using the StorageClass, and it starts with `pvc-`. To identify the disk name, you can run `kubectl get pvc` or navigate to the secondary resource group in the portal to find it. See [manage resources from the Azure portal][manage-resources-azure-portal] to learn more.
182+
183+
```azurecli
184+
az disk update --subscription subscriptionName --resource-group myResourceGroup --name diskName --disk-iops-read-write=5000 --disk-mbps-read-write=200
185+
```
186+
187+
## Next steps
188+
189+
- For more about Premium SSD v2 disks, see [Using Azure Premium SSD v2 disks](../virtual-machines/disks-deploy-premium-v2.md).
190+
- For more about storage best practices, see [Best practices for storage and backups in Azure Kubernetes Service (AKS)][operator-best-practices-storage].
191+
192+
<!-- LINKS - external -->
193+
[kubectl-apply]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply
194+
[kubernetes-storage-classes]: https://kubernetes.io/docs/concepts/storage/storage-classes/
195+
196+
<!-- LINKS - internal -->
197+
[azure-premium-v2-disk-overview]: ../virtual-machines/disks-types.md#premium-ssd-v2
198+
[premium-v2-regions]: ../virtual-machines/disks-types.md#regional-availability
199+
[premium-v2-limitations]: ../virtual-machines/disks-types.md#premium-ssd-v2-limitations
200+
[azure-disk-volume]: azure-disk-csi.md
201+
[use-tags]: use-tags.md
202+
[operator-best-practices-storage]: operator-best-practices-storage.md
203+
[az-disk-update]: /cli/azure/disk#az-disk-update
204+
[manage-resources-azure-portal]: ../azure-resource-manager/management/manage-resources-portal.md#open-resources
205+
[aks-two-resource-groups]: faq.md#why-are-two-resource-groups-created-with-aks

articles/aks/use-ultra-disks.md

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,49 @@
22
title: Enable Ultra Disk support on Azure Kubernetes Service (AKS)
33
description: Learn how to enable and configure Ultra Disks in an Azure Kubernetes Service (AKS) cluster
44
ms.topic: article
5-
ms.date: 03/28/2023
5+
ms.date: 04/10/2023
66

77
---
88

99
# Use Azure ultra disks on Azure Kubernetes Service
1010

11-
[Azure ultra disks](../virtual-machines/disks-enable-ultra-ssd.md) offer high throughput, high IOPS, and consistent low latency disk storage for your stateful applications. With ultra disks, you can dynamically change the performance of the SSD along with your workloads without the need to restart your agent nodes. Ultra disks are suited for data-intensive workloads.
11+
[Azure ultra disks][ultra-disk-overview] offer high throughput, high IOPS, and consistent low latency disk storage for your stateful applications. One major benefit of ultra disks is the ability to dynamically change the performance of the SSD along with your workloads without the need to restart your agent nodes. Ultra disks are suited for data-intensive workloads.
1212

13-
## Before you begin
13+
This article describes how to configure a new or existing AKS cluster to use Azure ultra disks.
1414

15-
This feature can only be set at cluster or node pool creation time.
15+
## Before you begin
1616

17-
> [!IMPORTANT]
18-
> Azure ultra disks require node pools deployed in availability zones and regions that support these disks and specific VM series. For more information, see the [**Ultra disks GA scope and limitations**](../virtual-machines/disks-enable-ultra-ssd.md#ga-scope-and-limitations).
17+
This feature can only be set at cluster creation or when creating a node pool.
1918

2019
### Limitations
2120

22-
- Ultra disks can't be used with certain features, such as availability sets or Azure Disk encryption. Review [**Ultra disks GA scope and limitations**](../virtual-machines/disks-enable-ultra-ssd.md#ga-scope-and-limitations) before proceeding.
21+
- Azure ultra disks require node pools deployed in availability zones and regions that support these disks, and are only supported by specific VM series. Review the corresponding table under the [Ultra disk limitations][ultra-disk-limitations] section for more information.
22+
- Ultra disks can't be used with some features and functionality, such as availability sets or Azure Disk Encryption. Review the [Ultra disk limitations][ultra-disk-limitations] for the latest information.
2323
- The supported size range for ultra disks is between *100* and *1500*.
2424

2525
## Create a cluster that can use ultra disks
2626

27-
Create an AKS cluster that can use ultra disks by enabling the `EnableUltraSSD` feature.
27+
Create an AKS cluster that is able to leverage Azure ultra Disks by using the following CLI commands. Use the `--enable-ultra-ssd` parameter to set the `EnableUltraSSD` feature.
2828

29-
1. Create an Azure resource group using the [`az group create`][az-group-create] command.
30-
31-
```azurecli-interactive
32-
az group create --name myResourceGroup --location westus2
33-
```
29+
```azurecli-interactive
30+
az aks create -g MyResourceGroup -n myAKSCluster -l westus2 --node-vm-size Standard_D2s_v3 --zones 1 2 --node-count 2 --enable-ultra-ssd
31+
```
3432

35-
2. Create an AKS-managed Azure AD cluster with support for ultra disks using the [`az aks create`][az-aks-create] command with the `--enable-ultra-ssd` flag.
36-
37-
```azurecli-interactive
38-
az aks create -g MyResourceGroup -n myAKSCluster -l westus2 --node-vm-size Standard_D2s_v3 --zones 1 2 --node-count 2 --enable-ultra-ssd
39-
```
33+
If you want to create a cluster without ultra disk support, you can do so by omitting the `--enable-ultra-ssd` parameter.
4034

4135
## Enable ultra disks on an existing cluster
4236

43-
You can enable ultra disks on existing clusters by adding a new node pool to your cluster that support ultra disks.
37+
You can enable ultra disks on an existing cluster by adding a new node pool to your cluster that support ultra disks. Configure a new node pool to use ultra disks by using the `--enable-ultra-ssd` parameter with the [`az aks nodepool add`][az-aks-nodepool-add] command.
4438

45-
- Configure a new node pool to use ultra disks using the [`az aks nodepool add`][az-aks-nodepool-add] command with the `--enable-ultra-ssd` flag.
46-
47-
```azurecli
48-
az aks nodepool add --name ultradisk --cluster-name myAKSCluster --resource-group myResourceGroup --node-vm-size Standard_D2s_v3 --zones 1 2 --node-count 2 --enable-ultra-ssd
49-
```
39+
If you want to create new node pools without support for ultra disks, you can do so by excluding the `--enable-ultra-ssd` parameter.
5040

5141
## Use ultra disks dynamically with a storage class
5242

5343
To use ultra disks in your deployments or stateful sets, you can use a [storage class for dynamic provisioning][azure-disk-volume].
5444

5545
### Create the storage class
5646

57-
A storage class is used to define how a unit of storage is dynamically created with a persistent volume. For more information on Kubernetes storage classes, see [Kubernetes storage classes][kubernetes-storage-classes]. In this case, we'll create a storage class that references ultra disks.
47+
A storage class is used to define how a unit of storage is dynamically created with a persistent volume. For more information on Kubernetes storage classes, see [Kubernetes storage classes][kubernetes-storage-classes]. In this example, we'll create a storage class that references ultra disks.
5848

5949
1. Create a file named `azure-ultra-disk-sc.yaml` and copy in the following manifest:
6050

@@ -75,7 +65,7 @@ A storage class is used to define how a unit of storage is dynamically created w
7565
7666
2. Create the storage class using the [`kubectl apply`][kubectl-apply] command and specify your `azure-ultra-disk-sc.yaml` file.
7767

78-
```console
68+
```bash
7969
kubectl apply -f azure-ultra-disk-sc.yaml
8070
```
8171

@@ -109,7 +99,7 @@ A persistent volume claim (PVC) is used to automatically provision storage based
10999

110100
2. Create the persistent volume claim using the [`kubectl apply`][kubectl-apply] command and specify your `azure-ultra-disk-pvc.yaml` file.
111101

112-
```console
102+
```bash
113103
kubectl apply -f azure-ultra-disk-pvc.yaml
114104
```
115105

@@ -166,7 +156,7 @@ Once the persistent volume claim has been created and the disk successfully prov
166156

167157
3. See your configuration details using the `kubectl describe pod` command and specify your `nginx-ultra.yaml` file.
168158

169-
```console
159+
```bash
170160
kubectl describe pod nginx-ultra
171161
```
172162

@@ -193,10 +183,6 @@ Once the persistent volume claim has been created and the disk successfully prov
193183
[...]
194184
```
195185

196-
## Using Azure tags
197-
198-
For more details on using Azure tags, see [Use Azure tags in AKS][use-tags].
199-
200186
## Next steps
201187

202188
- For more about ultra disks, see [Using Azure ultra disks](../virtual-machines/disks-enable-ultra-ssd.md).
@@ -207,9 +193,9 @@ For more details on using Azure tags, see [Use Azure tags in AKS][use-tags].
207193
[kubernetes-storage-classes]: https://kubernetes.io/docs/concepts/storage/storage-classes/
208194

209195
<!-- LINKS - internal -->
196+
[ultra-disk-overview]: ../virtual-machines/disks-types.md#ultra-disks
197+
[ultra-disk-limitations]: ../virtual-machines/disks-types.md#ultra-disk-limitations
210198
[azure-disk-volume]: azure-disk-csi.md
211199
[operator-best-practices-storage]: operator-best-practices-storage.md
212200
[use-tags]: use-tags.md
213-
[az-group-create]: /cli/azure/group#az_group_create
214-
[az-aks-create]: /cli/azure/aks#az_aks_create
215201
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az_aks_nodepool_add

0 commit comments

Comments
 (0)