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-files-dynamic-pv.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure Kubernetes Service
4
4
description: Learn how to dynamically create a persistent volume with Azure Files for use with multiple concurrent pods in Azure Kubernetes Service (AKS)
5
5
services: container-service
6
6
ms.topic: article
7
-
ms.date: 07/01/2020
7
+
ms.date: 03/22/2021
8
8
9
9
10
10
#Customer intent: As a developer, I want to learn how to dynamically create and attach storage using Azure Files to pods in AKS.
@@ -46,6 +46,7 @@ apiVersion: storage.k8s.io/v1
46
46
metadata:
47
47
name: my-azurefile
48
48
provisioner: file.csi.azure.com # replace with "kubernetes.io/azure-file" if aks version is less than 1.21
49
+
allowVolumeExpansion: true
49
50
mountOptions:
50
51
- dir_mode=0777
51
52
- file_mode=0777
@@ -55,7 +56,7 @@ mountOptions:
55
56
- cache=strict
56
57
- actimeo=30
57
58
parameters:
58
-
skuName: Standard_LRS
59
+
skuName: Premium_LRS
59
60
```
60
61
61
62
Create the storage class with the [kubectl apply][kubectl-apply] command:
A persistent volume claim (PVC) uses the storage class object to dynamically provision an Azure file share. The following YAML can be used to create a persistent volume claim *5 GB* in size with *ReadWriteMany* access. For more information on access modes, see the [Kubernetes persistent volume][access-modes] documentation.
70
+
A persistent volume claim (PVC) uses the storage class object to dynamically provision an Azure file share. The following YAML can be used to create a persistent volume claim *100 GB* in size with *ReadWriteMany* access. For more information on access modes, see the [Kubernetes persistent volume][access-modes] documentation.
70
71
71
72
Now create a file named `azure-file-pvc.yaml` and copy in the following YAML. Make sure that the *storageClassName* matches the storage class created in the last step:
72
73
@@ -81,7 +82,7 @@ spec:
81
82
storageClassName: my-azurefile
82
83
resources:
83
84
requests:
84
-
storage: 5Gi
85
+
storage: 100Gi
85
86
```
86
87
87
88
> [!NOTE]
@@ -99,7 +100,7 @@ Once completed, the file share will be created. A Kubernetes secret is also crea
99
100
$ kubectl get pvc my-azurefile
100
101
101
102
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
0 commit comments