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
- If you haven't already installed Azure Container Storage, follow the instructions in [Install Azure Container Storage](container-storage-aks-quickstart.md).
21
-
22
20
- Ensure your subscription has [Azure role-based access control (Azure RBAC) Owner](../../role-based-access-control/built-in-roles/general.md#owner) role. For Azure Container Storage to successfully communicate with Elastic SAN's API, it needs special permissions that the Owner role will grant.
- If you haven't already installed Azure Container Storage, follow the instructions in [Install Azure Container Storage](container-storage-aks-quickstart.md).
24
-
25
-
- Check if your target region is supported in [Azure Container Storage regions](container-storage-introduction.md#regional-availability).
26
-
27
23
## Choose a VM type that supports Ephemeral Disk
28
24
29
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.
- If you haven't already installed Azure Container Storage, follow the instructions in [Install Azure Container Storage](container-storage-aks-quickstart.md).
21
-
22
20
> [!NOTE]
23
21
> To use Azure Container Storage with Azure managed disks, your AKS cluster should have a node pool of at least three [general purpose VMs](../../virtual-machines/sizes-general.md) such as **standard_d4s_v5** for the cluster nodes, each with a minimum of four virtual CPUs (vCPUs).
First, create a storage pool, which is a logical grouping of storage for your Kubernetes cluster, by defining it in a YAML manifest file.
32
26
33
-
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). If you have Azure managed disks that are already provisioned, you can [create a pre-provisioned storage pool](#create-a-pre-provisioned-storage-pool) using those disks.
27
+
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).
34
28
35
-
> [!IMPORTANT]
36
-
> If you want to use your own keys to encrypt your volumes instead of using Microsoft-managed keys, don't create your storage pool using the steps in this section. Instead, go to [Enable server-side encryption with customer-managed keys](#enable-server-side-encryption-with-customer-managed-keys) and follow the steps there.
37
-
38
-
Follow these steps to create a storage pool for Azure Disks.
29
+
Follow these steps to create a storage pool for Azure Disks. You can also:
30
+
-[Create a storage pool with a pre-provisioned Azure managed disk](#create-a-pre-provisioned-storage-pool)
31
+
-[Create a storage pool that has server-side encryption with customer managed keys enabled](#enable-server-side-encryption-with-customer-managed-keys)
39
32
40
33
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-storagepool.yaml`.
41
34
@@ -76,6 +69,115 @@ Follow these steps to create a storage pool for Azure Disks.
76
69
77
70
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](#create-a-persistent-volume-claim).
78
71
72
+
## Display the available storage classes
73
+
74
+
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.
75
+
76
+
Run `kubectl get sc` to display the available storage classes. You should see a storage class called `acstor-<storage-pool-name>`.
77
+
78
+
> [!IMPORTANT]
79
+
> 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.
80
+
81
+
## Create a persistent volume claim
82
+
83
+
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.
84
+
85
+
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-pvc.yaml`.
86
+
87
+
1. Paste in the following code and save the file. The PVC `name` value can be whatever you want.
88
+
89
+
```yml
90
+
apiVersion: v1
91
+
kind: PersistentVolumeClaim
92
+
metadata:
93
+
name: azurediskpvc
94
+
spec:
95
+
accessModes:
96
+
- ReadWriteOnce
97
+
storageClassName: acstor-azuredisk # replace with the name of your storage class if different
98
+
resources:
99
+
requests:
100
+
storage: 100Gi
101
+
```
102
+
103
+
1. Apply the YAML manifest file to create the PVC.
104
+
105
+
```azurecli-interactive
106
+
kubectl apply -f acstor-pvc.yaml
107
+
```
108
+
109
+
You should see output similar to:
110
+
111
+
```output
112
+
persistentvolumeclaim/azurediskpvc created
113
+
```
114
+
115
+
You can verify the status of the PVC by running the following command:
116
+
117
+
```azurecli-interactive
118
+
kubectl describe pvc azurediskpvc
119
+
```
120
+
121
+
Once the PVC is created, it's ready for use by a pod.
122
+
123
+
## Deploy a pod and attach a persistent volume
124
+
125
+
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.
126
+
127
+
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-pod.yaml`.
128
+
129
+
1. Paste in the following code and save the file.
130
+
131
+
```yml
132
+
kind: Pod
133
+
apiVersion: v1
134
+
metadata:
135
+
name: fiopod
136
+
spec:
137
+
nodeSelector:
138
+
acstor.azure.com/io-engine: acstor
139
+
volumes:
140
+
- name: azurediskpv
141
+
persistentVolumeClaim:
142
+
claimName: azurediskpvc
143
+
containers:
144
+
- name: fio
145
+
image: nixery.dev/shell/fio
146
+
args:
147
+
- sleep
148
+
- "1000000"
149
+
volumeMounts:
150
+
- mountPath: "/volume"
151
+
name: azurediskpv
152
+
```
153
+
154
+
1. Apply the YAML manifest file to deploy the pod.
155
+
156
+
```azurecli-interactive
157
+
kubectl apply -f acstor-pod.yaml
158
+
```
159
+
160
+
You should see output similar to the following:
161
+
162
+
```output
163
+
pod/fiopod created
164
+
```
165
+
166
+
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 Azure Disks as its storage, and you can use it for your Kubernetes workloads.
180
+
79
181
## Create a pre-provisioned storage pool
80
182
81
183
If you have Azure managed disks that are already provisioned, you can create a pre-provisioned storage pool using those disks. Because the disks are already provisioned, you don't need to specify the skuName or storage capacity when creating the storage pool.
@@ -186,115 +288,6 @@ Follow these steps to create a storage pool using your own encryption key. All p
186
288
187
289
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>`.
188
290
189
-
## Display the available storage classes
190
-
191
-
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.
192
-
193
-
Run `kubectl get sc` to display the available storage classes. You should see a storage class called `acstor-<storage-pool-name>`.
194
-
195
-
> [!IMPORTANT]
196
-
> 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.
197
-
198
-
## Create a persistent volume claim
199
-
200
-
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.
201
-
202
-
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-pvc.yaml`.
203
-
204
-
1. Paste in the following code and save the file. The PVC `name` value can be whatever you want.
205
-
206
-
```yml
207
-
apiVersion: v1
208
-
kind: PersistentVolumeClaim
209
-
metadata:
210
-
name: azurediskpvc
211
-
spec:
212
-
accessModes:
213
-
- ReadWriteOnce
214
-
storageClassName: acstor-azuredisk # replace with the name of your storage class if different
215
-
resources:
216
-
requests:
217
-
storage: 100Gi
218
-
```
219
-
220
-
1. Apply the YAML manifest file to create the PVC.
221
-
222
-
```azurecli-interactive
223
-
kubectl apply -f acstor-pvc.yaml
224
-
```
225
-
226
-
You should see output similar to:
227
-
228
-
```output
229
-
persistentvolumeclaim/azurediskpvc created
230
-
```
231
-
232
-
You can verify the status of the PVC by running the following command:
233
-
234
-
```azurecli-interactive
235
-
kubectl describe pvc azurediskpvc
236
-
```
237
-
238
-
Once the PVC is created, it's ready for use by a pod.
239
-
240
-
## Deploy a pod and attach a persistent volume
241
-
242
-
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.
243
-
244
-
1. Use your favorite text editor to create a YAML manifest file such as `code acstor-pod.yaml`.
245
-
246
-
1. Paste in the following code and save the file.
247
-
248
-
```yml
249
-
kind: Pod
250
-
apiVersion: v1
251
-
metadata:
252
-
name: fiopod
253
-
spec:
254
-
nodeSelector:
255
-
acstor.azure.com/io-engine: acstor
256
-
volumes:
257
-
- name: azurediskpv
258
-
persistentVolumeClaim:
259
-
claimName: azurediskpvc
260
-
containers:
261
-
- name: fio
262
-
image: nixery.dev/shell/fio
263
-
args:
264
-
- sleep
265
-
- "1000000"
266
-
volumeMounts:
267
-
- mountPath: "/volume"
268
-
name: azurediskpv
269
-
```
270
-
271
-
1. Apply the YAML manifest file to deploy the pod.
272
-
273
-
```azurecli-interactive
274
-
kubectl apply -f acstor-pod.yaml
275
-
```
276
-
277
-
You should see output similar to the following:
278
-
279
-
```output
280
-
pod/fiopod created
281
-
```
282
-
283
-
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 Azure Disks as its storage, and you can use it for your Kubernetes workloads.
297
-
298
291
## Detach and reattach a persistent volume
299
292
300
293
To detach a persistent volume, delete the pod that the persistent volume is attached to. Replace `<pod-name>` with the name of the pod, for example **fiopod**.
Copy file name to clipboardExpand all lines: includes/container-storage-prerequisites.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,3 +11,7 @@ ms.author: kendownie
11
11
- This article requires the latest version (2.35.0 or later) of the Azure CLI. See [How to install the Azure CLI](/cli/azure/install-azure-cli). If you're using the Bash environment in Azure Cloud Shell, the latest version is already installed. If you plan to run the commands locally instead of in Azure Cloud Shell, be sure to run them with administrative privileges. For more information, see [Get started with Azure Cloud Shell](/azure/cloud-shell/get-started).
12
12
13
13
- You'll need the Kubernetes command-line client, `kubectl`. It's already installed if you're using Azure Cloud Shell, or you can install it locally by running the `az aks install-cli` command.
14
+
15
+
- If you haven't already installed Azure Container Storage, follow the instructions in [Install Azure Container Storage](../articles/storage/container-storage/container-storage-aks-quickstart.md).
16
+
17
+
- Check if your target region is supported in [Azure Container Storage regions](../articles/storage/container-storage/container-storage-introduction.md#regional-availability).
0 commit comments