You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -74,7 +74,7 @@ To connect to the cluster, use the Kubernetes command-line client, `kubectl`. It
74
74
75
75
## Choose a data storage option for your storage pool
76
76
77
-
Before deploying Azure Container Storage, you'll need to decide which back-end storage option you want to use to create your storage pool and persistent volumes. Three options are currently available:
77
+
Before deploying Azure Container Storage, you'll need to decide which back-end storage option you want to use to create your storage pool and volumes. Three options are currently available:
78
78
79
79
- **Azure Elastic SAN**: Azure Elastic SAN is a good fit for general purpose databases, streaming and messaging services, CI/CD environments, and other tier 1/tier 2 workloads. Storage is provisioned on demand per created volume and volume snapshot. Multiple clusters can access a single SAN concurrently, however persistent volumes can only be attached by one consumer at a time.
80
80
@@ -190,8 +190,10 @@ az aks update -n <cluster-name> -g <resource-group> --disable-azure-container-st
190
190
191
191
## Next step
192
192
193
-
To create persistent volumes, select the link for the backing storage type you selected.
193
+
To create volumes, select the link for the backing storage type you selected.
194
194
195
-
-[Create persistent volume claim with Azure managed disks](use-container-storage-with-managed-disks.md#3-create-a-persistent-volume-claim)
196
-
-[Create persistent volume claim with Ephemeral Disk](use-container-storage-with-local-disk.md#create-a-persistent-volume-claim)
197
-
-[Create persistent volume claim with Azure Elastic SAN](use-container-storage-with-elastic-san.md#3-create-a-persistent-volume-claim)
195
+
-[Create persistent volume with Azure managed disks](use-container-storage-with-managed-disks.md#3-create-a-persistent-volume-claim)
196
+
-[Create persistent volume with Azure Elastic SAN](use-container-storage-with-elastic-san.md#3-create-a-persistent-volume-claim)
197
+
-[Create generic ephemeral volume with local NVMe](use-container-storage-with-local-disk.md#create-and-attach-generic-ephemeral-volumes)
198
+
-[Create generic ephemeral volume with temp SSD](use-container-storage-with-temp-ssd.md#create-and-attach-generic-ephemeral-volumes)
199
+
-[Create persistent volume with local NVMe and volume replication](use-container-storage-with-local-nvme-replication.md#create-and-attach-persistent-volumes)
Copy file name to clipboardExpand all lines: articles/storage/container-storage/install-container-storage-aks.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,8 +223,10 @@ Congratulations, you've successfully installed Azure Container Storage. You now
223
223
224
224
## Next step
225
225
226
-
Now you can create a storage pool and persistent volume claim, and then deploy a pod and attach a persistent volume. Follow the steps in the appropriate how-to article.
226
+
Now you can create a storage pool and volumes. Follow the steps in the appropriate article depending on the backing storage type you want to use.
227
227
228
-
*[Use Azure Container Storage with Azure Elastic SAN](use-container-storage-with-elastic-san.md)
229
-
*[Use Azure Container Storage with Azure Disks](use-container-storage-with-managed-disks.md)
230
-
*[Use Azure Container Storage with Ephemeral Disk (local NVMe or temp SSD)](use-container-storage-with-local-disk.md)
title: Use Azure Container Storage Preview with Ephemeral Disk
3
-
description: Configure Azure Container Storage for use with Ephemeral Disk using either local NVMe or temp SSD on the Azure Kubernetes Service (AKS) cluster nodes. Create a storage pool, select a storage class, create a persistent volume claim, and attach the persistent volume to a pod.
2
+
title: Use Azure Container Storage Preview with local NVMe
3
+
description: Configure Azure Container Storage for use with Ephemeral Disk using local NVMe on the Azure Kubernetes Service (AKS) cluster nodes. Create a storage pool, select a storage class, and deploy a pod with a generic ephemeral volume.
4
4
author: khdownie
5
5
ms.service: azure-container-storage
6
6
ms.topic: how-to
7
-
ms.date: 05/24/2024
7
+
ms.date: 06/19/2024
8
8
ms.author: kendownie
9
9
ms.custom: references_regions
10
10
---
11
11
12
-
# Use Azure Container Storage Preview with Ephemeral Disk
12
+
# Use Azure Container Storage Preview with local NVMe
13
13
14
-
[Azure Container Storage](container-storage-introduction.md) is a cloud-based volume management, deployment, and orchestration service built natively for containers. This article shows you how to configure Azure Container Storage to use Ephemeral Disk as back-end storage for your Kubernetes workloads. At the end, you'll have a pod that's using either local NVMe or temp SSD as its storage.
14
+
[Azure Container Storage](container-storage-introduction.md) is a cloud-based volume management, deployment, and orchestration service built natively for containers. This article shows you how to configure Azure Container Storage to use Ephemeral Disk with local NVMe as back-end storage for your Kubernetes workloads. At the end, you'll have a pod that's using local NVMe as its storage.
15
15
16
16
> [!IMPORTANT]
17
-
> Local disks are ephemeral, meaning that they're created on the local virtual machine (VM) storage and not saved to an Azure storage service. Data will be lost on these disks if you stop/deallocate your VM. You can only create [Kubernetes generic ephemeral volumes](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) from an Ephemeral Disk storage pool. If you want to create a persistent volume, you have to enable [replication for your storage pool](#create-storage-pool-with-volume-replication-nvme-only).
17
+
> Local disks are ephemeral, meaning that they're created on the local virtual machine (VM) storage and not saved to an Azure storage service. Data will be lost on these disks if you stop/deallocate your VM. You can only create [Kubernetes generic ephemeral volumes](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes) from an Ephemeral Disk storage pool. If you want to create a persistent volume, you have to [use local NVMe with volume replication](use-container-storage-with-local-nvme-replication.md).
Ephemeral Disk is only available in certain types of VMs. If you plan to use Ephemeral Disk with local NVMe, a [storage optimized VM](../../virtual-machines/sizes-storage.md) such as **standard_l8s_v3** is required. If you plan to use Ephemeral Disk with temp SSD, a [Ev3 and Esv3-series VM](../../virtual-machines/ev3-esv3-series.md) is required.
25
+
Ephemeral Disk is only available in certain types of VMs. If you plan to use local NVMe, a [storage optimized VM](../../virtual-machines/sizes-storage.md) such as **standard_l8s_v3** is required.
26
26
27
27
You can run the following command to get the VM type that's used with your node pool.
28
28
@@ -40,19 +40,15 @@ nodepool1 standard_l8s_v3
40
40
41
41
We recommend that each VM have a minimum of four virtual CPUs (vCPUs), and each node pool have at least three nodes.
42
42
43
-
## Create a storage pool
43
+
## Create and attach generic ephemeral volumes
44
44
45
-
First, create a storage pool, which is a logical grouping of storage for your Kubernetes cluster, by defining it in a YAML manifest file.
46
-
47
-
If you enabled Azure Container Storage using `az aks create` or `az aks update` commands, you might already have a storage pool. Use `kubectl get sp -n acstor` to get the list of storage pools. If you have a storage pool already available that you want to use, you can skip this section and proceed to [Display the available storage classes](#display-the-available-storage-classes).
45
+
Follow these steps to create and attach a generic ephemeral volume.
48
46
49
-
You have three options to create a storage pool that uses Ephemeral Disk:
47
+
### 1. Create a storage pool
50
48
51
-
-[Create storage pool with local NVMe](#create-a-storage-pool-with-nvme)
52
-
-[Create storage pool with temp SSD](#create-a-storage-pool-with-temp-ssd)
53
-
-[Create storage pool with local NVMe and replication](#create-storage-pool-with-volume-replication-nvme-only)
49
+
First, create a storage pool, which is a logical grouping of storage for your Kubernetes cluster, by defining it in a YAML manifest file.
54
50
55
-
### Create a storage pool with NVMe
51
+
If you enabled Azure Container Storage using `az aks create` or `az aks update` commands, you might already have a storage pool. Use `kubectl get sp -n acstor` to get the list of storage pools. If you have a storage pool already available that you want to use, you can skip this section and proceed to [Display the available storage classes](#2-display-the-available-storage-classes).
56
52
57
53
Follow these steps to create a storage pool using local NVMe.
58
54
@@ -91,49 +87,9 @@ Follow these steps to create a storage pool using local NVMe.
91
87
92
88
When the storage pool is created, Azure Container Storage will create a storage class on your behalf, using the naming convention `acstor-<storage-pool-name>`.
93
89
94
-
### Create a storage pool with temp SSD
95
-
96
-
Follow these steps to create a storage pool using temp SSD.
97
-
98
-
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-storagepool.yaml`.
99
-
100
-
1. Paste in the following code and save the file. The storage pool **name** value can be whatever you want.
101
-
102
-
```yml
103
-
apiVersion: containerstorage.azure.com/v1
104
-
kind: StoragePool
105
-
metadata:
106
-
name: ephemeraldisk
107
-
namespace: acstor
108
-
spec:
109
-
poolType:
110
-
ephemeralDisk:
111
-
diskType: temp
112
-
```
113
-
114
-
1. Apply the YAML manifest file to create the storage pool.
115
-
116
-
```azurecli-interactive
117
-
kubectl apply -f acstor-storagepool.yaml
118
-
```
119
-
120
-
When storage pool creation is complete, you'll see a message like:
121
-
122
-
```output
123
-
storagepool.containerstorage.azure.com/ephemeraldisk created
124
-
```
125
-
126
-
You can also run this command to check the status of the storage pool. Replace `<storage-pool-name>` with your storage pool **name** value. For this example, the value would be **ephemeraldisk**.
127
-
128
-
```azurecli-interactive
129
-
kubectl describe sp <storage-pool-name> -n acstor
130
-
```
131
-
132
-
When the storage pool is created, Azure Container Storage will create a storage class on your behalf, using the naming convention `acstor-<storage-pool-name>`.
133
-
134
-
## Display the available storage classes
90
+
### 2. Display the available storage classes
135
91
136
-
When the storage pool is ready to use, you must select a storage class to define how storage is dynamically created when creating persistent volume claims and deploying persistent volumes.
92
+
When the storage pool is ready to use, you must select a storage class to define how storage is dynamically created when creating and deploying volumes.
137
93
138
94
Run `kubectl get sc` to display the available storage classes. You should see a storage class called `acstor-<storage-pool-name>`.
> Don't use the storage class that's marked **internal**. It's an internal storage class that's needed for Azure Container Storage to work.
148
104
149
-
## Deploy a pod with a generic ephemeral volume
105
+
### 3. Deploy a pod with a generic ephemeral volume
150
106
151
107
Create a pod using [Fio](https://github.com/axboe/fio) (Flexible I/O Tester) for benchmarking and workload simulation, that uses a generic ephemeral volume.
152
108
@@ -211,11 +167,15 @@ Create a pod using [Fio](https://github.com/axboe/fio) (Flexible I/O Tester) for
You've now deployed a pod that's using Ephemeral Disk as its storage, and you can use it for your Kubernetes workloads.
170
+
You've now deployed a pod that's using local NVMe as its storage, and you can use it for your Kubernetes workloads.
171
+
172
+
## Manage storage pools
215
173
216
-
## Expand a storage pool
174
+
Now that you've created your storage pool, you can expand or delete it as needed.
217
175
218
-
You can expand storage pools backed by local NVMe or temp SSD to scale up quickly and without downtime. Shrinking storage pools isn't currently supported.
176
+
### Expand a storage pool
177
+
178
+
You can expand storage pools backed by local NVMe to scale up quickly and without downtime. Shrinking storage pools isn't currently supported.
219
179
220
180
Because a storage pool backed by Ephemeral Disk uses local storage resources on the AKS cluster nodes (VMs), expanding the storage pool requires adding another node to the cluster. Follow these instructions to expand the storage pool.
221
181
@@ -229,178 +189,14 @@ Because a storage pool backed by Ephemeral Disk uses local storage resources on
229
189
230
190
1. Run `kubectl get sp -A` and you should see that the capacity of the storage pool has increased.
231
191
232
-
## Delete a storage pool
192
+
###Delete a storage pool
233
193
234
194
If you want to delete a storage pool, run the following command. Replace `<storage-pool-name>` with the storage pool name.
235
195
236
196
```azurecli-interactive
237
197
kubectl delete sp -n acstor <storage-pool-name>
238
198
```
239
199
240
-
## Create storage pool with volume replication (NVMe only)
241
-
242
-
Applications that use local NVMe can leverage storage replication for improved resiliency. Replication isn't currently supported for temp SSD.
243
-
244
-
Azure Container Storage currently supports three-replica and five-replica configurations. If you specify three replicas, you must have at least three nodes in your AKS cluster. If you specify five replicas, you must have at least five nodes.
245
-
246
-
Follow these steps to create a storage pool using local NVMe with replication.
247
-
248
-
> [!NOTE]
249
-
> Because Ephemeral Disk storage pools consume all the available NVMe disks, you must delete any existing Ephemeral Disk local NVMe storage pools before creating a new storage pool with replication.
250
-
251
-
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-storagepool.yaml`.
252
-
253
-
1. Paste in the following code and save the file. The storage pool **name** value can be whatever you want. Set replicas to 3 or 5.
254
-
255
-
```yml
256
-
apiVersion: containerstorage.azure.com/v1
257
-
kind: StoragePool
258
-
metadata:
259
-
name: nvme
260
-
namespace: acstor
261
-
spec:
262
-
poolType:
263
-
ephemeralDisk:
264
-
diskType: nvme
265
-
replicas: 3
266
-
```
267
-
268
-
1. Apply the YAML manifest file to create the storage pool.
269
-
270
-
```azurecli-interactive
271
-
kubectl apply -f acstor-storagepool.yaml
272
-
```
273
-
274
-
When storage pool creation is complete, you'll see a message like:
275
-
276
-
```output
277
-
storagepool.containerstorage.azure.com/nvme created
278
-
```
279
-
280
-
You can also run this command to check the status of the storage pool. Replace `<storage-pool-name>` with your storage pool **name** value. For this example, the value would be **nvme**.
281
-
282
-
```azurecli-interactive
283
-
kubectl describe sp <storage-pool-name> -n acstor
284
-
```
285
-
286
-
When the storage pool is created, Azure Container Storage will create a storage class on your behalf, using the naming convention `acstor-<storage-pool-name>`. Now you can [display the available storage classes](#display-the-available-storage-classes) and create a persistent volume claim.
287
-
288
-
## Create a persistent volume claim
289
-
290
-
A persistent volume claim (PVC) is used to automatically provision storage based on a storage class. Follow these steps to create a PVC using the new storage class.
291
-
292
-
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-pvc.yaml`.
293
-
294
-
1. Paste in the following code and save the file. The PVC `name` value can be whatever you want.
295
-
296
-
```yml
297
-
apiVersion: v1
298
-
kind: PersistentVolumeClaim
299
-
metadata:
300
-
name: ephemeralpvc
301
-
spec:
302
-
accessModes:
303
-
- ReadWriteOnce
304
-
storageClassName: acstor-ephemeraldisk-nvme # replace with the name of your storage class if different
305
-
resources:
306
-
requests:
307
-
storage: 100Gi
308
-
```
309
-
310
-
1. Apply the YAML manifest file to create the PVC.
311
-
312
-
```azurecli-interactive
313
-
kubectl apply -f acstor-pvc.yaml
314
-
```
315
-
316
-
You should see output similar to:
317
-
318
-
```output
319
-
persistentvolumeclaim/ephemeralpvc created
320
-
```
321
-
322
-
You can verify the status of the PVC by running the following command:
323
-
324
-
```azurecli-interactive
325
-
kubectl describe pvc ephemeralpvc
326
-
```
327
-
328
-
Once the PVC is created, it's ready for use by a pod.
329
-
330
-
## Deploy a pod and attach a persistent volume
331
-
332
-
Create a pod using [Fio](https://github.com/axboe/fio) (Flexible I/O Tester) for benchmarking and workload simulation, and specify a mount path for the persistent volume. For **claimName**, use the **name** value that you used when creating the persistent volume claim.
333
-
334
-
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-pod.yaml`.
335
-
336
-
1. Paste in the following code and save the file.
337
-
338
-
```yml
339
-
kind: Pod
340
-
apiVersion: v1
341
-
metadata:
342
-
name: fiopod
343
-
spec:
344
-
nodeSelector:
345
-
acstor.azure.com/io-engine: acstor
346
-
volumes:
347
-
- name: ephemeralpv
348
-
persistentVolumeClaim:
349
-
claimName: ephemeralpvc
350
-
containers:
351
-
- name: fio
352
-
image: nixery.dev/shell/fio
353
-
args:
354
-
- sleep
355
-
- "1000000"
356
-
volumeMounts:
357
-
- mountPath: "/volume"
358
-
name: ephemeralpv
359
-
```
360
-
361
-
1. Apply the YAML manifest file to deploy the pod.
362
-
363
-
```azurecli-interactive
364
-
kubectl apply -f acstor-pod.yaml
365
-
```
366
-
367
-
You should see output similar to the following:
368
-
369
-
```output
370
-
pod/fiopod created
371
-
```
372
-
373
-
1. Check that the pod is running and that the persistent volume claim has been bound successfully to the pod:
You've now deployed a pod that's using Ephemeral Disk as its storage, and you can use it for your Kubernetes workloads.
387
-
388
-
## Detach and reattach a persistent volume
389
-
390
-
To detach a persistent volume, delete the pod that the persistent volume is attached to.
391
-
392
-
```azurecli-interactive
393
-
kubectl delete pods <pod-name>
394
-
```
395
-
396
-
To reattach a persistent volume, simply reference the persistent volume claim name in the YAML manifest file as described in [Deploy a pod and attach a persistent volume](#deploy-a-pod-and-attach-a-persistent-volume).
397
-
398
-
To check which persistent volume a persistent volume claim is bound to, run:
399
-
400
-
```azurecli-interactive
401
-
kubectl get pvc <persistent-volume-claim-name>
402
-
```
403
-
404
200
## See also
405
201
406
202
-[What is Azure Container Storage?](container-storage-introduction.md)
0 commit comments