Skip to content

Commit 920b25d

Browse files
committed
split up ephemeral
1 parent b6eb793 commit 920b25d

6 files changed

+484
-241
lines changed

articles/storage/container-storage/TOC.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@
1313
items:
1414
- name: Create AKS cluster and install Azure Container Storage
1515
href: install-container-storage-aks.md
16-
- name: How-to guides
16+
- name: Storage options
1717
items:
1818
- name: Use with Azure Disks
1919
href: use-container-storage-with-managed-disks.md
20-
- name: Use with Ephemeral Disk
21-
href: use-container-storage-with-local-disk.md
2220
- name: Use with Azure Elastic SAN
2321
href: use-container-storage-with-elastic-san.md
22+
- name: Use with local NVMe
23+
href: use-container-storage-with-local-disk.md
24+
- name: Use with local NVMe replication
25+
href: use-container-storage-with-local-nvme-replication.md
26+
- name: Use with temp SSD
27+
href: use-container-storage-with-temp-ssd.md
28+
- name: How-to guides
29+
items:
2430
- name: Use volume snapshot and restore
2531
href: volume-snapshot-restore.md
2632
- name: Expand a persistent volume

articles/storage/container-storage/container-storage-aks-quickstart.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Create a Linux-based Azure Kubernetes Service (AKS) cluster, instal
44
author: khdownie
55
ms.service: azure-container-storage
66
ms.topic: quickstart
7-
ms.date: 03/21/2024
7+
ms.date: 06/19/2024
88
ms.author: kendownie
99
ms.custom: devx-track-azurecli, ignite-2023-container-storage, linux-related-content
1010
---
@@ -74,7 +74,7 @@ To connect to the cluster, use the Kubernetes command-line client, `kubectl`. It
7474
7575
## Choose a data storage option for your storage pool
7676
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:
7878
7979
- **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.
8080
@@ -190,8 +190,10 @@ az aks update -n <cluster-name> -g <resource-group> --disable-azure-container-st
190190
191191
## Next step
192192

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.
194194

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)

articles/storage/container-storage/install-container-storage-aks.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ Congratulations, you've successfully installed Azure Container Storage. You now
223223

224224
## Next step
225225

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.
227227

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)
228+
- [Use Azure managed disks](use-container-storage-with-managed-disks.md)
229+
- [Use Azure Elastic SAN](use-container-storage-with-elastic-san.md)
230+
- [Use local NVMe](use-container-storage-with-local-disk.md)
231+
- [Use temp SSD](use-container-storage-with-temp-ssd.md)
232+
- [Use local NVMe and volume replication](use-container-storage-with-local-nvme-replication.md)
Lines changed: 24 additions & 228 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
2-
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.
44
author: khdownie
55
ms.service: azure-container-storage
66
ms.topic: how-to
7-
ms.date: 05/24/2024
7+
ms.date: 06/19/2024
88
ms.author: kendownie
99
ms.custom: references_regions
1010
---
1111

12-
# Use Azure Container Storage Preview with Ephemeral Disk
12+
# Use Azure Container Storage Preview with local NVMe
1313

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.
1515

1616
> [!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).
1818
1919
## Prerequisites
2020

2121
[!INCLUDE [container-storage-prerequisites](../../../includes/container-storage-prerequisites.md)]
2222

23-
## Choose a VM type that supports Ephemeral Disk
23+
## Choose a VM type that supports local NVMe
2424

25-
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.
2626

2727
You can run the following command to get the VM type that's used with your node pool.
2828

@@ -40,19 +40,15 @@ nodepool1 standard_l8s_v3
4040

4141
We recommend that each VM have a minimum of four virtual CPUs (vCPUs), and each node pool have at least three nodes.
4242

43-
## Create a storage pool
43+
## Create and attach generic ephemeral volumes
4444

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.
4846

49-
You have three options to create a storage pool that uses Ephemeral Disk:
47+
### 1. Create a storage pool
5048

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.
5450

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).
5652

5753
Follow these steps to create a storage pool using local NVMe.
5854

@@ -91,49 +87,9 @@ Follow these steps to create a storage pool using local NVMe.
9187

9288
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>`.
9389

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
13591

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.
13793

13894
Run `kubectl get sc` to display the available storage classes. You should see a storage class called `acstor-<storage-pool-name>`.
13995

@@ -146,7 +102,7 @@ acstor-ephemeraldisk containerstorage.csi.azure.com Delete Wai
146102
> [!IMPORTANT]
147103
> 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.
148104
149-
## Deploy a pod with a generic ephemeral volume
105+
### 3. Deploy a pod with a generic ephemeral volume
150106

151107
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.
152108

@@ -211,11 +167,15 @@ Create a pod using [Fio](https://github.com/axboe/fio) (Flexible I/O Tester) for
211167
kubectl exec -it fiopod -- fio --name=benchtest --size=800m --filename=/volume/test --direct=1 --rw=randrw --ioengine=libaio --bs=4k --iodepth=16 --numjobs=8 --time_based --runtime=60
212168
```
213169

214-
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
215173

216-
## Expand a storage pool
174+
Now that you've created your storage pool, you can expand or delete it as needed.
217175

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.
219179

220180
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.
221181

@@ -229,178 +189,14 @@ Because a storage pool backed by Ephemeral Disk uses local storage resources on
229189

230190
1. Run `kubectl get sp -A` and you should see that the capacity of the storage pool has increased.
231191

232-
## Delete a storage pool
192+
### Delete a storage pool
233193

234194
If you want to delete a storage pool, run the following command. Replace `<storage-pool-name>` with the storage pool name.
235195

236196
```azurecli-interactive
237197
kubectl delete sp -n acstor <storage-pool-name>
238198
```
239199

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:
374-
375-
```azurecli-interactive
376-
kubectl describe pod fiopod
377-
kubectl describe pvc ephemeralpvc
378-
```
379-
380-
1. Check fio testing to see its current status:
381-
382-
```azurecli-interactive
383-
kubectl exec -it fiopod -- fio --name=benchtest --size=800m --filename=/volume/test --direct=1 --rw=randrw --ioengine=libaio --bs=4k --iodepth=16 --numjobs=8 --time_based --runtime=60
384-
```
385-
386-
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-
404200
## See also
405201

406202
- [What is Azure Container Storage?](container-storage-introduction.md)

0 commit comments

Comments
 (0)