Skip to content

Commit 146da3c

Browse files
authored
Merge pull request #192434 from andyzhangx/patch-41
Update azure-files-dynamic-pv.md
2 parents 61550db + 5b9e1be commit 146da3c

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

articles/aks/azure-files-csi.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use Container Storage Interface (CSI) drivers for Azure Files on Azure Ku
33
description: Learn how to use the Container Storage Interface (CSI) drivers for Azure Files in an Azure Kubernetes Service (AKS) cluster.
44
services: container-service
55
ms.topic: article
6-
ms.date: 12/10/2021
6+
ms.date: 03/22/2021
77
author: palma21
88

99
---
@@ -276,8 +276,11 @@ kind: StorageClass
276276
metadata:
277277
name: azurefile-csi-nfs
278278
provisioner: file.csi.azure.com
279+
allowVolumeExpansion: true
279280
parameters:
280281
protocol: nfs
282+
mountOptions:
283+
- nconnect=8
281284
```
282285
283286
After editing and saving the file, create the storage class with the [kubectl apply][kubectl-apply] command:

articles/aks/azure-files-dynamic-pv.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure Kubernetes Service
44
description: Learn how to dynamically create a persistent volume with Azure Files for use with multiple concurrent pods in Azure Kubernetes Service (AKS)
55
services: container-service
66
ms.topic: article
7-
ms.date: 07/01/2020
7+
ms.date: 03/22/2021
88

99

1010
#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
4646
metadata:
4747
name: my-azurefile
4848
provisioner: file.csi.azure.com # replace with "kubernetes.io/azure-file" if aks version is less than 1.21
49+
allowVolumeExpansion: true
4950
mountOptions:
5051
- dir_mode=0777
5152
- file_mode=0777
@@ -55,7 +56,7 @@ mountOptions:
5556
- cache=strict
5657
- actimeo=30
5758
parameters:
58-
skuName: Standard_LRS
59+
skuName: Premium_LRS
5960
```
6061
6162
Create the storage class with the [kubectl apply][kubectl-apply] command:
@@ -66,7 +67,7 @@ kubectl apply -f azure-file-sc.yaml
6667

6768
## Create a persistent volume claim
6869

69-
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.
7071

7172
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:
7273

@@ -81,7 +82,7 @@ spec:
8182
storageClassName: my-azurefile
8283
resources:
8384
requests:
84-
storage: 5Gi
85+
storage: 100Gi
8586
```
8687
8788
> [!NOTE]
@@ -99,7 +100,7 @@ Once completed, the file share will be created. A Kubernetes secret is also crea
99100
$ kubectl get pvc my-azurefile
100101

101102
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
102-
my-azurefile Bound pvc-8436e62e-a0d9-11e5-8521-5a8664dc0477 5Gi RWX my-azurefile 5m
103+
my-azurefile Bound pvc-8436e62e-a0d9-11e5-8521-5a8664dc0477 10Gi RWX my-azurefile 5m
103104
```
104105

105106
## Use the persistent volume
@@ -172,6 +173,7 @@ apiVersion: storage.k8s.io/v1
172173
metadata:
173174
name: my-azurefile
174175
provisioner: file.csi.azure.com # replace with "kubernetes.io/azure-file" if aks version is less than 1.21
176+
allowVolumeExpansion: true
175177
mountOptions:
176178
- dir_mode=0777
177179
- file_mode=0777
@@ -181,7 +183,7 @@ mountOptions:
181183
- cache=strict
182184
- actimeo=30
183185
parameters:
184-
skuName: Standard_LRS
186+
skuName: Premium_LRS
185187
```
186188
187189
## Using Azure tags

0 commit comments

Comments
 (0)