Skip to content

Commit ef6f6a3

Browse files
committed
Andy Zhang edits
1 parent d035ff5 commit ef6f6a3

File tree

1 file changed

+18
-47
lines changed

1 file changed

+18
-47
lines changed

articles/storage/files/azure-kubernetes-service-workloads.md

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use Azure file shares for Azure Kubernetes Service (AK
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: concept-article
7-
ms.date: 07/02/2025
7+
ms.date: 07/25/2025
88
ms.author: kendownie
99
# Customer intent: "As a Kubernetes administrator, I want to implement Azure Files for my Azure Kubernetes Service (AKS) workloads requiring persistent, shared storage, so that I can better support my organization's containerized applications."
1010
---
@@ -52,15 +52,15 @@ The Azure Files Container Storage Interface (CSI) driver is a critical component
5252

5353
### How the CSI driver works
5454

55-
The Azure Files CSI driver operates through several key components:
55+
In AKS clusters, the Azure Files CSI driver is installed and managed automatically. The driver operates through several key components:
5656

5757
- **CSI driver pod**: Runs as a DaemonSet on each node in the AKS cluster, responsible for mounting and unmounting Azure file shares
5858
- **CSI controller**: Manages the lifecycle of Azure file shares, including creation, deletion, and volume expansion
5959
- **Storage classes**: Define the parameters and policies for dynamic provisioning of Azure file shares
6060
- **Persistent volumes**: Represent the actual Azure file shares in Kubernetes
6161
- **Persistent volume claims**: User requests for storage that are bound to persistent volumes
6262

63-
When a pod requests storage through a persistent volume claim, the CSI driver coordinates with Azure APIs to either create a new Azure file share (dynamic provisioning) or connect to an existing share (static provisioning). The driver then mounts the share into the pod's filesystem namespace, making it accessible to applications.
63+
When a pod requests storage through a persistent volume claim, the CSI driver coordinates with Azure APIs to either create a new Azure file share ([dynamic provisioning](#dynamic-provisioning)) or connect to an existing share ([static provisioning](#static-provisioning)). The driver then mounts the share into the pod's filesystem namespace, making it accessible to applications.
6464

6565
### CSI driver capabilities
6666

@@ -71,34 +71,6 @@ The Azure Files CSI driver provides several advanced capabilities:
7171
- **Snapshot support**: Enables point-in-time snapshots for backup and recovery scenarios
7272
- **Cross-platform compatibility**: Works with both Linux and Windows node pools in AKS
7373

74-
### Driver installation and management
75-
76-
In AKS clusters, the Azure Files CSI driver is installed and managed automatically.
77-
78-
This YAML demonstrates the DaemonSet configuration for the Azure Files CSI driver node components, which run on every node in the AKS cluster to handle volume mounting operations:
79-
80-
```yaml
81-
# Example of CSI driver components (managed automatically in AKS)
82-
apiVersion: apps/v1
83-
kind: DaemonSet
84-
metadata:
85-
name: csi-azurefile-node
86-
namespace: kube-system
87-
spec:
88-
selector:
89-
matchLabels:
90-
app: csi-azurefile-node
91-
template:
92-
spec:
93-
containers:
94-
- name: node-driver-registrar
95-
image: mcr.microsoft.com/oss/kubernetes-csi/node-driver-registrar:v2.5.0
96-
- name: azurefile
97-
image: mcr.microsoft.com/oss/kubernetes-csi/azurefile-csi:v1.18.0
98-
securityContext:
99-
privileged: true
100-
```
101-
10274
## Common use cases for Azure Files with AKS
10375

10476
Some common use cases for Azure Files with AKS include:
@@ -127,7 +99,7 @@ metadata:
12799
spec:
128100
accessModes:
129101
- ReadWriteMany
130-
storageClassName: azurefile
102+
storageClassName: azurefile-csi-premium
131103
resources:
132104
requests:
133105
storage: 10Gi
@@ -172,7 +144,7 @@ metadata:
172144
spec:
173145
accessModes:
174146
- ReadWriteMany
175-
storageClassName: azurefile
147+
storageClassName: azurefile-csi-premium
176148
resources:
177149
requests:
178150
storage: 100Gi
@@ -208,7 +180,6 @@ spec:
208180
path: /var/log
209181
```
210182
211-
212183
## Storage classes and provisioning options
213184
214185
Azure Files CSI driver supports both static and dynamic provisioning through Kubernetes storage classes:
@@ -289,25 +260,25 @@ mountOptions:
289260
This YAML example demonstrates how to create Azure file storage with private endpoint configuration for enhanced security:
290261
291262
```yaml
292-
# Example of using private endpoints with Azure Files
293-
apiVersion: v1
294-
kind: Secret
295-
metadata:
296-
name: azure-secret
297-
type: Opaque
298-
data:
299-
azurestorageaccountname: <base64-encoded-account-name>
300-
azurestorageaccountkey: <base64-encoded-account-key>
301-
---
302263
apiVersion: storage.k8s.io/v1
303264
kind: StorageClass
304265
metadata:
305-
name: azurefile-csi-private
266+
name: azurefile-csi
306267
provisioner: file.csi.azure.com
268+
allowVolumeExpansion: true
307269
parameters:
308-
skuName: Premium_LRS
309-
protocol: smb
270+
skuName: Premium_LRS # available values: Premium_LRS, Premium_ZRS, Standard_LRS, Standard_GRS, Standard_ZRS, Standard_RAGRS, Standard_RAGZRS
310271
networkEndpointType: privateEndpoint
272+
reclaimPolicy: Delete
273+
volumeBindingMode: Immediate
274+
mountOptions:
275+
- dir_mode=0777 # modify this permission if you want to enhance the security
276+
- file_mode=0777
277+
- mfsymlinks
278+
- cache=strict # https://linux.die.net/man/8/mount.cifs
279+
- nosharesock # reduce probability of reconnect race
280+
- actimeo=30 # reduce latency for metadata-heavy workload
281+
- nobrl # disable sending byte range lock requests to the server and for applications which have challenges with posix locks
311282
```
312283
313284
## See also

0 commit comments

Comments
 (0)