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
Copy file name to clipboardExpand all lines: articles/aks/azure-csi-blob-storage-provision.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ This section provides guidance for cluster administrators who want to provision
42
42
|server | Specify Azure storage account domain name. | Existing storage account DNS domain name, for example `<storage-account>.privatelink.blob.core.windows.net`. | No | If empty, driver uses default `<storage-account>.blob.core.windows.net` or other sovereign cloud storage account DNS domain name.|
43
43
|allowBlobPublicAccess | Allow or disallow public access to all blobs or containers for storage account created by driver. |`true`,`false`| No |`false`|
44
44
|storageEndpointSuffix | Specify Azure storage endpoint suffix. |`core.windows.net`| No | If empty, driver will use default storage endpoint suffix according to cloud environment.|
45
-
|tags |[tags][az-tags] would be created in new storage account. | Tag format: 'foo=aaa,bar=bbb' | No | ""|
45
+
|tags |[Tags][az-tags] would be created in new storage account. | Tag format: 'foo=aaa,bar=bbb' | No | ""|
46
46
|matchTags | Match tags when driver tries to find a suitable storage account. |`true`,`false`| No |`false`|
47
47
|--- |**Following parameters are only for blobfuse**| --- | --- |--- |
48
48
|subscriptionID | Specify Azure subscription ID where blob storage directory will be created. | Azure subscription ID | No | If not empty, `resourceGroup` must be provided.|
@@ -75,7 +75,7 @@ A persistent volume claim (PVC) uses the storage class object to dynamically pro
75
75
storage: 5Gi
76
76
```
77
77
78
-
2. Create the persistent volume claim with the kubectl create command:
78
+
2. Create the persistent volume claim with the [kubectl create][kubectl-create] command:
79
79
80
80
```bash
81
81
kubectl create -f blob-nfs-pvc.yaml
@@ -324,7 +324,7 @@ The following example demonstrates how to mount a Blob storage container as a pe
324
324
> [!NOTE]
325
325
> While the [Kubernetes API](https://github.com/kubernetes/kubernetes/blob/release-1.26/pkg/apis/core/types.go#L303-L306) **capacity** attribute is mandatory, this value isn't used by the Azure Blob storage CSI driver because you can flexibly write data until you reach your storage account's capacity limit. The value of the `capacity` attribute is used only for size matching between *PersistentVolumes* and *PersistenVolumeClaims*. We recommend using a fictitious high value. The pod sees a mounted volume with a fictitious size of 5 Petabytes.
326
326
327
-
2. Run the following command to create the persistent volume using the `kubectl create` command referencing the YAML file created earlier:
327
+
2. Run the following command to create the persistent volume using the [kubectl create][kubectl-create] command referencing the YAML file created earlier:
328
328
329
329
```bash
330
330
kubectl create -f pv-blob-nfs.yaml
@@ -347,7 +347,7 @@ The following example demonstrates how to mount a Blob storage container as a pe
347
347
storageClassName: azureblob-nfs-premium
348
348
```
349
349
350
-
4. Run the following command to create the persistent volume claim using the `kubectl create` command referencing the YAML file created earlier:
350
+
4. Run the following command to create the persistent volume claim using the [kubectl create][kubectl-create] command referencing the YAML file created earlier:
351
351
352
352
```bash
353
353
kubectl create -f pvc-blob-nfs.yaml
@@ -412,7 +412,7 @@ Kubernetes needs credentials to access the Blob storage container created earlie
412
412
namespace: default
413
413
```
414
414
415
-
3. Run the following command to create the persistent volume using the `kubectl create` command referencing the YAML file created earlier:
415
+
3. Run the following command to create the persistent volume using the [kubectl create][kubectl-create] command referencing the YAML file created earlier:
416
416
417
417
```bash
418
418
kubectl create -f pv-blobfuse.yaml
@@ -435,7 +435,7 @@ Kubernetes needs credentials to access the Blob storage container created earlie
435
435
storageClassName: azureblob-fuse-premium
436
436
```
437
437
438
-
5. Run the following command to create the persistent volume claim using the `kubectl create` command referencing the YAML file created earlier:
438
+
5. Run the following command to create the persistent volume claim using the [kubectl create][kubectl-create] command referencing the YAML file created earlier:
439
439
440
440
```bash
441
441
kubectl create -f pvc-blobfuse.yaml
@@ -445,7 +445,7 @@ Kubernetes needs credentials to access the Blob storage container created earlie
445
445
446
446
### Use the persistent volume
447
447
448
-
The following YAML creates a pod that uses the persistent volume or persistent volume claim named **pvc-blob** created earlier, to mount the Azure Blob storage at the `/mnt/blob' path.
448
+
The following YAML creates a pod that uses the persistent volume or persistent volume claim named **pvc-blob** created earlier, to mount the Azure Blob storage at the `/mnt/blob` path.
449
449
450
450
1. Create a file named `nginx-pod-blob.yaml`, and copy in the following YAML. Make sure that the **claimName** matches the PVC created in the previous step when creating a persistent volume for NFS or Blobfuse.
451
451
@@ -469,7 +469,7 @@ The following YAML creates a pod that uses the persistent volume or persistent v
469
469
claimName: pvc-blob
470
470
```
471
471
472
-
2. Run the following command to create the pod and mount the PVC using the `kubectl create` command referencing the YAML file created earlier:
472
+
2. Run the following command to create the pod and mount the PVC using the [kubectl create][kubectl-create] command referencing the YAML file created earlier:
473
473
474
474
```bash
475
475
kubectl create -f nginx-pod-blob.yaml
@@ -501,6 +501,8 @@ The following YAML creates a pod that uses the persistent volume or persistent v
Copy file name to clipboardExpand all lines: articles/aks/azure-csi-disk-storage-provision.md
+35-22Lines changed: 35 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ For more information on Kubernetes volumes, see [Storage options for application
26
26
27
27
- The Azure CLI version 2.0.59 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
28
28
29
-
The Azure Disks CSI driver has a limit of 32 volumes per node. The volume count changes based on the size of the node/node pool. Run the following command to determine the number of volumes that can be allocated per node:
29
+
The Azure Disks CSI driver has a limit of 32 volumes per node. The volume count changes based on the size of the node/node pool. Run the [kubectl get][kubectl-get] command to determine the number of volumes that can be allocated per node:
30
30
31
31
```console
32
32
kubectl get CSINode <nodename> -o yaml
@@ -47,7 +47,7 @@ This section provides guidance for cluster administrators who want to provision
47
47
|resourceGroup | Specify the resource group where the Azure Disks will be created | Existing resource group name | No | If empty, driver will use the same resource group name as current AKS cluster|
|LogicalSectorSize | Logical sector size in bytes for Ultra disk. Supported values are 512 ad 4096. 4096 is the default. |`512`, `4096`| No |`4096`|
50
+
|LogicalSectorSize | Logical sector size in bytes for ultra disk. Supported values are 512 ad 4096. 4096 is the default. |`512`, `4096`| No |`4096`|
51
51
|tags | Azure Disk [tags][azure-tags]| Tag format: `key1=val1,key2=val2`| No | ""|
52
52
|diskEncryptionSetID | ResourceId of the disk encryption set to use for [enabling encryption at rest][disk-encryption]| format: `/subscriptions/{subs-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSet-name}`| No | ""|
53
53
|diskEncryptionType | Encryption type of the disk encryption set. |`EncryptionAtRestWithCustomerKey`(by default), `EncryptionAtRestWithPlatformAndCustomerKeys`| No | ""|
@@ -88,7 +88,7 @@ kubectl get sc
88
88
89
89
The output of the command resembles the following example:
The output of the command resembles the following example:
130
130
131
-
```bash
131
+
```console
132
132
persistentvolumeclaim/azure-managed-disk created
133
133
```
134
134
@@ -167,19 +167,23 @@ Create the pod with the [kubectl apply][kubectl-apply] command, as shown in the
167
167
168
168
```console
169
169
kubectl apply -f azure-pvc-disk.yaml
170
+
```
171
+
172
+
The output of the command resembles the following example:
170
173
174
+
```console
171
175
pod/mypod created
172
176
```
173
177
174
-
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 mypod`, as shown in the following condensed example:
178
+
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 using the [kubectl describe][kubectl-describe] command, as shown in the following condensed example:
175
179
176
180
```bash
177
181
kubectl describe pod mypod
178
182
```
179
183
180
184
The output of the command resembles the following example:
181
185
182
-
```bash
186
+
```console
183
187
[...]
184
188
Volumes:
185
189
volume:
@@ -200,19 +204,23 @@ Events:
200
204
[...]
201
205
```
202
206
203
-
### Use Ultra Disks
207
+
### Use Azure ultra disks
204
208
205
-
To use ultra disk, see [Use Ultra Disks on Azure Kubernetes Service (AKS)][use-ultra-disks].
209
+
To use Azure ultra disk, see [Use ultra disks on Azure Kubernetes Service (AKS)][use-ultra-disks].
206
210
207
211
### Back up a persistent volume
208
212
209
213
To back up the data in your persistent volume, take a snapshot of the managed disk for the volume. You can then use this snapshot to create a restored disk and attach to pods as a means of restoring the data.
210
214
211
-
First, get the volume name with the `kubectl get pvc` command, such as for the PVC named *azure-managed-disk*:
215
+
First, get the volume name with the [kubectl get][kubectl-get] command, such as for the PVC named *azure-managed-disk*:
212
216
213
-
```console
214
-
$ kubectl get pvc azure-managed-disk
217
+
```bash
218
+
kubectl get pvc azure-managed-disk
219
+
```
215
220
221
+
The output of the command resembles the following example:
222
+
223
+
```console
216
224
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
Use the disk ID to create a snapshot disk with [az snapshot create][az-snapshot-create]. The following example creates a snapshot named *pvcSnapshot* in the same resource group as the AKS cluster (*MC_myResourceGroup_myAKSCluster_eastus*). You may encounter permission issues if you create snapshots and restore disks in resource groups that the AKS cluster doesn't have access to.
236
+
Use the disk ID to create a snapshot disk with [az snapshot create][az-snapshot-create]. The following example creates a snapshot named *pvcSnapshot* in the same resource group as the AKS cluster *MC_myResourceGroup_myAKSCluster_eastus*. You may encounter permission issues if you create snapshots and restore disks in resource groups that the AKS cluster doesn't have access to.
229
237
230
238
```azurecli
231
239
az snapshot create \
@@ -282,12 +290,12 @@ spec:
282
290
Create the pod with the [kubectl apply][kubectl-apply] command, as shown in the following example:
283
291
284
292
```bash
285
-
$ kubectl apply -f azure-restored.yaml
293
+
kubectl apply -f azure-restored.yaml
286
294
```
287
295
288
296
The output of the command resembles the following example:
289
297
290
-
```bash
298
+
```console
291
299
pod/mypodrestored created
292
300
```
293
301
@@ -299,7 +307,7 @@ kubectl describe pod mypodrestored
299
307
300
308
The output of the command resembles the following example:
301
309
302
-
```bash
310
+
```console
303
311
[...]
304
312
Volumes:
305
313
volume:
@@ -337,7 +345,7 @@ When you create an Azure disk for use with AKS, you can create the disk resource
337
345
1. Identify the resource group name using the [az aks show][az-aks-show] command and add the `--query nodeResourceGroup` parameter. The following example gets the node resource group for the AKS cluster name *myAKSCluster* in the resource group name *myResourceGroup*:
338
346
339
347
```azurecli-interactive
340
-
$ az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv
348
+
az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv
341
349
342
350
MC_myResourceGroup_myAKSCluster_eastus
343
351
```
@@ -402,19 +410,23 @@ When you create an Azure disk for use with AKS, you can create the disk resource
402
410
storageClassName: managed-csi
403
411
```
404
412
405
-
3. Use the `kubectl` commands to create the *PersistentVolume* and *PersistentVolumeClaim*, referencing the two YAML files created earlier:
413
+
3. Use the [kubectl apply][kubectl-apply] commands to create the *PersistentVolume* and *PersistentVolumeClaim*, referencing the two YAML files created earlier:
406
414
407
-
```console
415
+
```bash
408
416
kubectl apply -f pv-azuredisk.yaml
409
417
kubectl apply -f pvc-azuredisk.yaml
410
418
```
411
419
412
420
4. To verify your *PersistentVolumeClaim* is created and bound to the *PersistentVolume*, run the
413
421
following command:
414
422
423
+
```bash
424
+
kubectl get pvc pvc-azuredisk
425
+
```
426
+
427
+
The output of the command resembles the following example:
428
+
415
429
```console
416
-
$ kubectl get pvc pvc-azuredisk
417
-
418
430
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
419
431
pvc-azuredisk Bound pv-azuredisk 20Gi RWO 5s
420
432
```
@@ -448,10 +460,10 @@ following command:
448
460
claimName: pvc-azuredisk
449
461
```
450
462
451
-
6. Run the following command to apply the configuration and mount the volume, referencing the YAML
463
+
6. Run the [kubectl apply][kubectl-apply] command to apply the configuration and mount the volume, referencing the YAML
452
464
configuration file created in the previous steps:
453
465
454
-
```console
466
+
```bash
455
467
kubectl apply -f azure-disk-pod.yaml
456
468
```
457
469
@@ -467,6 +479,7 @@ configuration file created in the previous steps:
0 commit comments