Skip to content

Commit 6946e26

Browse files
authored
Merge pull request #232435 from schaffererin/aksazureultradisks
Editing pass for consistent formatting
2 parents ad3bed3 + c8d3ea4 commit 6946e26

File tree

1 file changed

+144
-155
lines changed

1 file changed

+144
-155
lines changed

articles/aks/use-ultra-disks.md

Lines changed: 144 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -2,225 +2,214 @@
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: 1/9/2022
5+
ms.date: 03/28/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. 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.
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.
1212

1313
## Before you begin
1414

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

1717
> [!IMPORTANT]
18-
> Azure ultra disks require nodepools deployed in availability zones and regions that support these disks as well as only specific VM series. See the [**Ultra disks GA scope and limitations**](../virtual-machines/disks-enable-ultra-ssd.md#ga-scope-and-limitations).
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).
1919
2020
### Limitations
2121

22-
- Ultra disks can't be used with some features and functionality, 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.
23-
- The supported size range for ultra disks is between 100 and 1500.
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.
23+
- The supported size range for ultra disks is between *100* and *1500*.
2424

25-
## Create a new cluster that can use ultra disks
25+
## Create a cluster that can use ultra disks
2626

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

29-
Create an Azure resource group:
29+
1. Create an Azure resource group using the [`az group create`][az-group-create] command.
3030

31-
```azurecli-interactive
32-
az group create --name myResourceGroup --location westus2
33-
```
31+
```azurecli-interactive
32+
az group create --name myResourceGroup --location westus2
33+
```
3434
35-
Create an AKS-managed Azure AD cluster with support for ultra disks.
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.
3636
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-
```
40-
41-
If you want to create clusters without ultra disk support, you can do so by omitting the `--enable-ultra-ssd` parameter.
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+
```
4240
4341
## Enable ultra disks on an existing cluster
4442
45-
You can enable ultra disks on existing clusters 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` flag.
43+
You can enable ultra disks on existing clusters by adding a new node pool to your cluster that support ultra disks.
4644
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-
```
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.
5046
51-
If you want to create new node pools without support for ultra disks, you can do so by omitting the `--enable-ultra-ssd` parameter.
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+
```
5250
5351
## Use ultra disks dynamically with a storage class
5452
55-
To use ultra disks in our deployments or stateful sets you can use a [storage class for dynamic provisioning][azure-disk-volume].
53+
To use ultra disks in your deployments or stateful sets, you can use a [storage class for dynamic provisioning][azure-disk-volume].
5654
5755
### Create the storage class
5856
59-
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].
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.
6058
61-
In this case, we'll create a storage class that references ultra disks. Create a file named `azure-ultra-disk-sc.yaml`, and copy in the following manifest.
59+
1. Create a file named `azure-ultra-disk-sc.yaml` and copy in the following manifest:
6260
63-
```yaml
64-
kind: StorageClass
65-
apiVersion: storage.k8s.io/v1
66-
metadata:
67-
name: ultra-disk-sc
68-
provisioner: disk.csi.azure.com # replace with "kubernetes.io/azure-disk" if aks version is less than 1.21
69-
volumeBindingMode: WaitForFirstConsumer # optional, but recommended if you want to wait until the pod that will use this disk is created
70-
parameters:
71-
skuname: UltraSSD_LRS
72-
kind: managed
73-
cachingMode: None
74-
diskIopsReadWrite: "2000" # minimum value: 2 IOPS/GiB
75-
diskMbpsReadWrite: "320" # minimum value: 0.032/GiB
76-
```
61+
```yaml
62+
kind: StorageClass
63+
apiVersion: storage.k8s.io/v1
64+
metadata:
65+
name: ultra-disk-sc
66+
provisioner: disk.csi.azure.com # replace with "kubernetes.io/azure-disk" if aks version is less than 1.21
67+
volumeBindingMode: WaitForFirstConsumer # optional, but recommended if you want to wait until the pod that will use this disk is created
68+
parameters:
69+
skuname: UltraSSD_LRS
70+
kind: managed
71+
cachingMode: None
72+
diskIopsReadWrite: "2000" # minimum value: 2 IOPS/GiB
73+
diskMbpsReadWrite: "320" # minimum value: 0.032/GiB
74+
```
7775
78-
Create the storage class with the [kubectl apply][kubectl-apply] command and specify your *azure-ultra-disk-sc.yaml* file:
76+
2. Create the storage class using the [`kubectl apply`][kubectl-apply] command and specify your `azure-ultra-disk-sc.yaml` file.
7977
80-
```console
81-
kubectl apply -f azure-ultra-disk-sc.yaml
82-
```
78+
```console
79+
kubectl apply -f azure-ultra-disk-sc.yaml
80+
```
8381
84-
The output from the command resembles the following example:
82+
Your output should resemble the following example output:
8583
86-
```console
87-
storageclass.storage.k8s.io/ultra-disk-sc created
88-
```
84+
```console
85+
storageclass.storage.k8s.io/ultra-disk-sc created
86+
```
8987
9088
## Create a persistent volume claim
9189
9290
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.
9391
94-
Create a file named `azure-ultra-disk-pvc.yaml`, and copy in the following manifest. The claim requests a disk named `ultra-disk` that is *1000 GB* in size with *ReadWriteOnce* access. The *ultra-disk-sc* storage class is specified as the storage class.
92+
1. Create a file named `azure-ultra-disk-pvc.yaml` and copy in the following manifest:
93+
94+
```yaml
95+
apiVersion: v1
96+
kind: PersistentVolumeClaim
97+
metadata:
98+
name: ultra-disk
99+
spec:
100+
accessModes:
101+
- ReadWriteOnce
102+
storageClassName: ultra-disk-sc
103+
resources:
104+
requests:
105+
storage: 1000Gi
106+
```
95107
96-
```yaml
97-
apiVersion: v1
98-
kind: PersistentVolumeClaim
99-
metadata:
100-
name: ultra-disk
101-
spec:
102-
accessModes:
103-
- ReadWriteOnce
104-
storageClassName: ultra-disk-sc
105-
resources:
106-
requests:
107-
storage: 1000Gi
108-
```
108+
The claim requests a disk named `ultra-disk` that is *1000 GB* in size with *ReadWriteOnce* access. The *ultra-disk-sc* storage class is specified as the storage class.
109109
110-
Create the persistent volume claim with the [kubectl apply][kubectl-apply] command and specify your *azure-ultra-disk-pvc.yaml* file:
110+
2. Create the persistent volume claim using the [`kubectl apply`][kubectl-apply] command and specify your `azure-ultra-disk-pvc.yaml` file.
111111
112-
```console
113-
kubectl apply -f azure-ultra-disk-pvc.yaml
114-
```
112+
```console
113+
kubectl apply -f azure-ultra-disk-pvc.yaml
114+
```
115115
116-
The output from the command resembles the following example:
116+
Your output should resemble the following example output:
117117
118-
```console
119-
persistentvolumeclaim/ultra-disk created
120-
```
118+
```console
119+
persistentvolumeclaim/ultra-disk created
120+
```
121121
122122
## Use the persistent volume
123123
124124
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 *ultra-disk* to mount the Azure disk at the path `/mnt/azure`.
125125
126-
Create a file named `nginx-ultra.yaml`, and copy in the following manifest.
127-
128-
```yaml
129-
kind: Pod
130-
apiVersion: v1
131-
metadata:
132-
name: nginx-ultra
133-
spec:
134-
containers:
135-
- name: nginx-ultra
136-
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
137-
resources:
138-
requests:
139-
cpu: 100m
140-
memory: 128Mi
141-
limits:
142-
cpu: 250m
143-
memory: 256Mi
144-
volumeMounts:
145-
- mountPath: "/mnt/azure"
146-
name: volume
147-
volumes:
148-
- name: volume
149-
persistentVolumeClaim:
150-
claimName: ultra-disk
151-
```
152-
153-
Create the pod with the [kubectl apply][kubectl-apply] command, as shown in the following example:
154-
155-
```console
156-
kubectl apply -f nginx-ultra.yaml
157-
```
158-
159-
The output from the command resembles the following example:
160-
161-
```console
162-
pod/nginx-ultra created
163-
```
164-
165-
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-ultra`, as shown in the following condensed example:
166-
167-
```console
168-
kubectl describe pod nginx-ultra
169-
170-
[...]
171-
Volumes:
172-
volume:
173-
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
174-
ClaimName: azure-managed-disk
175-
ReadOnly: false
176-
default-token-smm2n:
177-
Type: Secret (a volume populated by a Secret)
178-
SecretName: default-token-smm2n
179-
Optional: false
180-
[...]
181-
Events:
182-
Type Reason Age From Message
183-
---- ------ ---- ---- -------
184-
Normal Scheduled 2m default-scheduler Successfully assigned mypod to aks-nodepool1-79590246-0
185-
Normal SuccessfulMountVolume 2m kubelet, aks-nodepool1-79590246-0 MountVolume.SetUp succeeded for volume "default-token-smm2n"
186-
Normal SuccessfulMountVolume 1m kubelet, aks-nodepool1-79590246-0 MountVolume.SetUp succeeded for volume "pvc-faf0f176-8b8d-11e8-923b-deb28c58d242"
187-
[...]
188-
```
126+
1. Create a file named `nginx-ultra.yaml` and copy in the following manifest:
127+
128+
```yaml
129+
kind: Pod
130+
apiVersion: v1
131+
metadata:
132+
name: nginx-ultra
133+
spec:
134+
containers:
135+
- name: nginx-ultra
136+
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
137+
resources:
138+
requests:
139+
cpu: 100m
140+
memory: 128Mi
141+
limits:
142+
cpu: 250m
143+
memory: 256Mi
144+
volumeMounts:
145+
- mountPath: "/mnt/azure"
146+
name: volume
147+
volumes:
148+
- name: volume
149+
persistentVolumeClaim:
150+
claimName: ultra-disk
151+
```
152+
153+
2. Create the pod using [`kubectl apply`][kubectl-apply] command and specify your `nginx-ultra.yaml` file.
154+
155+
```console
156+
kubectl apply -f nginx-ultra.yaml
157+
```
158+
159+
Your output should resemble the following example output:
160+
161+
```console
162+
pod/nginx-ultra created
163+
```
164+
165+
You now have a running pod with your Azure disk mounted in the `/mnt/azure` directory.
166+
167+
3. See your configuration details using the `kubectl describe pod` command and specify your `nginx-ultra.yaml` file.
168+
169+
```console
170+
kubectl describe pod nginx-ultra
171+
```
172+
173+
Your output should resemble the following example output:
174+
175+
```console
176+
[...]
177+
Volumes:
178+
volume:
179+
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
180+
ClaimName: azure-managed-disk
181+
ReadOnly: false
182+
default-token-smm2n:
183+
Type: Secret (a volume populated by a Secret)
184+
SecretName: default-token-smm2n
185+
Optional: false
186+
[...]
187+
Events:
188+
Type Reason Age From Message
189+
---- ------ ---- ---- -------
190+
Normal Scheduled 2m default-scheduler Successfully assigned mypod to aks-nodepool1-79590246-0
191+
Normal SuccessfulMountVolume 2m kubelet, aks-nodepool1-79590246-0 MountVolume.SetUp succeeded for volume "default-token-smm2n"
192+
Normal SuccessfulMountVolume 1m kubelet, aks-nodepool1-79590246-0 MountVolume.SetUp succeeded for volume "pvc-faf0f176-8b8d-11e8-923b-deb28c58d242"
193+
[...]
194+
```
189195
190196
## Using Azure tags
191197
192-
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
198+
For more details on using Azure tags, see [Use Azure tags in AKS][use-tags].
193199
194200
## Next steps
195201
196202
- For more about ultra disks, see [Using Azure ultra disks](../virtual-machines/disks-enable-ultra-ssd.md).
197-
- For more about storage best practices, see [Best practices for storage and backups in Azure Kubernetes Service (AKS)][operator-best-practices-storage]
203+
- For more about storage best practices, see [Best practices for storage and backups in AKS][operator-best-practices-storage].
198204
199205
<!-- LINKS - external -->
200-
[access-modes]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes
201206
[kubectl-apply]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply
202-
[kubectl-get]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get
203207
[kubernetes-storage-classes]: https://kubernetes.io/docs/concepts/storage/storage-classes/
204-
[kubernetes-volumes]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
205-
[managed-disk-pricing-performance]: https://azure.microsoft.com/pricing/details/managed-disks/
206208
207209
<!-- LINKS - internal -->
208210
[azure-disk-volume]: azure-disk-csi.md
209-
[azure-files-pvc]: azure-files-csi.md
210-
[premium-storage]: ../virtual-machines/disks-types.md
211-
[az-disk-list]: /cli/azure/disk#az_disk_list
212-
[az-snapshot-create]: /cli/azure/snapshot#az_snapshot_create
213-
[az-disk-create]: /cli/azure/disk#az_disk_create
214-
[az-disk-show]: /cli/azure/disk#az_disk_show
215-
[aks-quickstart-cli]: kubernetes-walkthrough.md
216-
[aks-quickstart-portal]: kubernetes-walkthrough-portal.md
217-
[install-azure-cli]: /cli/azure/install-azure-cli
218211
[operator-best-practices-storage]: operator-best-practices-storage.md
219-
[concepts-storage]: concepts-storage.md
220-
[storage-class-concepts]: concepts-storage.md#storage-classes
221-
[az-extension-add]: /cli/azure/extension#az_extension_add
222-
[az-extension-update]: /cli/azure/extension#az_extension_update
223-
[az-feature-register]: /cli/azure/feature#az_feature_register
224-
[az-feature-list]: /cli/azure/feature#az_feature_list
225-
[az-provider-register]: /cli/azure/provider#az_provider_register
226212
[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
215+
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az_aks_nodepool_add

0 commit comments

Comments
 (0)