Skip to content

Commit 1dabd12

Browse files
committed
Fixes to AKS article for incorrect/outdated info; Pv2.
1 parent 28f6b4a commit 1dabd12

1 file changed

Lines changed: 104 additions & 99 deletions

File tree

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

Lines changed: 104 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ Azure Kubernetes Service is a managed Kubernetes service for deploying and scali
2222

2323
Azure Files supports `ReadWriteMany` (RWX) access mode required for multi-pod shared storage. Use the following SKU guidance:
2424

25-
| Workload type | Recommended SKU | Expected latency | Max IOPS (per share) |
26-
|---------------|-----------------|------------------|----------------------|
27-
| Config files, low I/O | Standard_LRS | 10–15 ms | 1,000 |
28-
| Logging, moderate I/O | Premium_LRS | 1–2 ms | Up to 100,000 |
29-
| Media/content, high throughput | Premium_ZRS | 1–2 ms | Up to 100,000 |
25+
| Workload type | File share type | Storage account kind | Storage account SKU |
26+
|-|-|-|-|
27+
| Logging, moderate I/O | SSD provisioned v2 with Local redundancy | `FileStorage` | `PremiumV2_LRS` |
28+
| Media/content, high throughput | SSD provisioned v2 with Zone redundancy | `FileStorage` | `PremiumV2_ZRS` |
29+
| Config files, low I/O | SSD provisioned v2, HDD provisioned v2, or HDD pay-as-you-go with Local redundancy | `FileStorage` (provisioned v2) or `StorageV2` (pay-as-you-go) | `PremiumV2_LRS`, `StandardV2_LRS`, `Standard_LRS` |
30+
31+
For complete scalability and performance information, see [Scalability and performance targets for Azure Files](storage-files-scale-targets.md).
3032

3133
Deploy the storage account in the same Azure region as your AKS cluster to minimize network latency.
3234

@@ -40,17 +42,19 @@ Azure Files integrates with Kubernetes through the Container Storage Interface (
4042

4143
### SSD file shares for optimal performance
4244

43-
Azure Files storage tiers:
45+
Azure Files has two media tiers. For new deployments, SSD provisioned v2 is recommended for most workloads:
46+
47+
- **SSD** (recommended): Suitable for logging, media serving, databases, and latency-sensitive workloads. Available with the provisioned v2 billing model (recommended, `PremiumV2_LRS` / `PremiumV2_ZRS`) or the legacy provisioned v1 billing model (`Premium_LRS` / `Premium_ZRS`). Up to 102,400 IOPS and 10,340 MiB/sec throughput per share.
48+
- **HDD**: Suitable for config files and infrequent access. Available with the provisioned v2 billing model (`StandardV2_LRS` / `StandardV2_ZRS`) or the pay-as-you-go billing model (`Standard_LRS` / `Standard_ZRS`). Up to 50,000 IOPS and 5,120 MiB/sec throughput per share with provisioned v2. For very small shares, HDD pay-as-you-go (`Standard_LRS` / `Standard_ZRS`) may be more cost-effective because HDD provisioned v2 requires a minimum amount of provisioned IOPS and throughput with no free baseline. For most other HDD workloads, SSD provisioned v2 is actually more cost-effective at small share sizes due to its included baseline IOPS and throughput.
4449

45-
- **Standard (HDD)**: Up to 1,000 IOPS, 60 MiB/s throughput per share. Use for config files, infrequent access.
46-
- **Premium (SSD)**: Baseline 400 IOPS + 1 IOPS per GiB provisioned, up to 100,000 IOPS. Use for logging, media serving, databases.
50+
For complete scalability and performance information, see [Scalability and performance targets for Azure Files](storage-files-scale-targets.md).
4751

4852
Deploy file shares in the same region as your AKS cluster. Cross-region mounts add 50–100+ ms latency.
4953

5054
### Protocol support
5155

5256
- **SMB 3.x**: Linux and Windows nodes. Requires port 445 outbound. Supports storage account key or Microsoft Entra ID authentication.
53-
- **NFS 4.1**: Linux nodes only. Requires Premium SKU and virtual network-enabled storage account. No authentication; relies on network security.
57+
- **NFS 4.1**: Linux nodes only. Requires SSD file shares and a virtual network-enabled storage account. No authentication; relies on network security.
5458

5559
### Security and compliance
5660

@@ -91,6 +95,87 @@ Some common use cases for Azure Files with AKS include:
9195
- **Batch processing and ETL workloads**: Azure Files enables efficient data sharing between batch processing jobs, ETL pipelines, and data processing workflows where multiple pods need access to input data and output results.
9296
- **Development and testing environments**: Shared storage for development teams to collaborate on code, share test data, and maintain consistent development environments across different pods and nodes.
9397

98+
## Dynamic provisioning: auto-create Azure file shares
99+
100+
Dynamic provisioning automatically creates Azure file shares when you create a persistent volume claim. Verify your environment meets these requirements:
101+
102+
| Requirement | Details |
103+
|-------------|----------|
104+
| **AKS version** | 1.21 or later |
105+
| **CSI driver version** | v1.0.0 or later (preinstalled on AKS 1.21+) |
106+
| **Supported node pools** | Linux: SMB and NFS protocols; Windows: SMB protocol only |
107+
| **Role assignments** | AKS cluster identity requires Storage Account Contributor role; for private endpoints, also requires Private DNS Zone Contributor |
108+
| **SKU options** | SSD provisioned v2 (recommended): `PremiumV2_LRS`, `PremiumV2_ZRS`; SSD provisioned v1: `Premium_LRS`, `Premium_ZRS`; HDD provisioned v2: `StandardV2_LRS`, `StandardV2_ZRS`, `StandardV2_GRS`, `StandardV2_GZRS`; HDD pay-as-you-go: `Standard_LRS`, `Standard_ZRS`, `Standard_GRS`, `Standard_GZRS` |
109+
| **Region constraints** | NFS protocol requires SSD file shares and a virtual network-enabled storage account; ZRS requires availability zone support |
110+
111+
With dynamic provisioning, storage is automatically created when a persistent volume claim is created. The Azure Files CSI driver supports dynamic provisioning through Kubernetes storage classes.
112+
113+
### Prerequisites for dynamic provisioning
114+
115+
Ensure the following are in place before creating a StorageClass for dynamic provisioning:
116+
117+
- AKS cluster version 1.21 or later
118+
- Linux node pool (for NFS) or Linux/Windows node pool (for SMB)
119+
- AKS cluster identity with **Storage Account Contributor** role on the resource group
120+
- For NFS: SSD file share (such as `PremiumV2_LRS` or `Premium_LRS`) with virtual network service endpoint enabled
121+
- For private endpoints: **Private DNS Zone Contributor** role on the private DNS zone
122+
123+
### Steps to configure dynamic provisioning
124+
125+
1. **Create the StorageClass** – Define the provisioning parameters (SKU, protocol, mount options).
126+
2. **Create a PersistentVolumeClaim (PVC)** – Reference the StorageClass; the CSI driver auto-creates the Azure file share.
127+
3. **Deploy your workload** – Mount the PVC in your pod spec.
128+
4. **Verify** – Confirm PVC is `Bound` and the mount path is accessible.
129+
130+
### StorageClass parameters for dynamic provisioning
131+
132+
Use these parameters when defining a StorageClass for Azure Files dynamic provisioning:
133+
134+
| Parameter | Value | Description |
135+
|-----------|-------|-------------|
136+
| `provisioner` | `file.csi.azure.com` | Azure Files CSI driver identifier |
137+
| `parameters.skuName` | `PremiumV2_LRS`, `PremiumV2_ZRS`, `Premium_LRS`, `Premium_ZRS`, `StandardV2_LRS`, `StandardV2_ZRS`, `StandardV2_GRS`, `StandardV2_GZRS`, `Standard_LRS`, `Standard_ZRS`, `Standard_GRS`, `Standard_GZRS` | Storage redundancy and tier |
138+
| `parameters.protocol` | `smb` or `nfs` | NFS requires SSD file shares and Linux nodes |
139+
| `allowVolumeExpansion` | `true` / `false` | Enable online volume resize |
140+
| `reclaimPolicy` | `Delete` / `Retain` | Action when PVC is deleted |
141+
| `volumeBindingMode` | `Immediate` / `WaitForFirstConsumer` | When to provision storage |
142+
143+
This YAML defines a storage class (Kubernetes provisioning template) for dynamic provisioning of SSD provisioned v2 Azure file shares with the SMB protocol. For Linux mount options, see [SMB mount options reference](#smb-mount-options-reference-linux).
144+
145+
```yaml
146+
apiVersion: storage.k8s.io/v1
147+
kind: StorageClass
148+
metadata:
149+
name: azurefile-csi-premiumv2-custom
150+
provisioner: file.csi.azure.com
151+
parameters:
152+
skuName: PremiumV2_LRS # SSD provisioned v2 (recommended). Alternatives: Premium_LRS (SSD v1), StandardV2_LRS (HDD v2), Standard_LRS (HDD pay-as-you-go)
153+
protocol: smb
154+
allowVolumeExpansion: true
155+
mountOptions:
156+
# Canonical permissions: 0755/uid=1000/gid=1000 for least privilege.
157+
# Use 0777/uid=0/gid=0 only if app requires root or broad write access.
158+
- dir_mode=0755
159+
- file_mode=0755
160+
- uid=1000
161+
- gid=1000
162+
- mfsymlinks
163+
- cache=strict
164+
- actimeo=30
165+
```
166+
167+
**Verify StorageClass:**
168+
169+
```bash
170+
# Check StorageClass exists
171+
kubectl get sc azurefile-csi-premiumv2-custom -o jsonpath="{.provisioner}"
172+
# Expected: file.csi.azure.com
173+
174+
# Test dynamic provisioning with a PVC (replace with your PVC name)
175+
kubectl get pvc <YOUR_PVC_NAME, e.g., my-azurefile-pvc> -o jsonpath="{.status.phase}"
176+
# Expected: Bound (after creating a PVC referencing this StorageClass)
177+
```
178+
94179
## Azure Files for shared configuration and secrets
95180

96181
Before deploying shared configuration storage, verify your environment meets these requirements:
@@ -101,7 +186,7 @@ Before deploying shared configuration storage, verify your environment meets the
101186
| **CSI driver version** | v1.0.0 or later (preinstalled on AKS 1.21+) |
102187
| **Supported node pools** | Linux and Windows |
103188
| **Role assignments** | Storage Account Contributor or Storage File Data SMB Share Contributor on the storage account |
104-
| **SKU options** | Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS |
189+
| **SKU options** | SSD provisioned v2: `PremiumV2_LRS`, `PremiumV2_ZRS` (recommended); SSD provisioned v1: `Premium_LRS`, `Premium_ZRS`; HDD provisioned v2: `StandardV2_LRS`, `StandardV2_ZRS`; HDD pay-as-you-go: `Standard_LRS`, `Standard_ZRS` |
105190
| **Region constraints** | ZRS SKUs require regions with availability zone support |
106191

107192
Azure Files is particularly useful for:
@@ -120,7 +205,7 @@ metadata:
120205
spec:
121206
accessModes:
122207
- ReadWriteMany
123-
storageClassName: azurefile-csi-premium
208+
storageClassName: azurefile-csi-premiumv2-custom
124209
resources:
125210
requests:
126211
storage: 10Gi
@@ -173,7 +258,7 @@ Before deploying centralized logging storage, verify your environment meets thes
173258
| **CSI driver version** | v1.0.0 or later (preinstalled on AKS 1.21+) |
174259
| **Supported node pools** | Linux (recommended for DaemonSet log collectors); Windows supported with SMB protocol |
175260
| **Role assignments** | Storage Account Contributor or Storage File Data SMB Share Contributor on the storage account |
176-
| **SKU options** | Premium_LRS or Premium_ZRS recommended for high-throughput logging |
261+
| **SKU options** | `PremiumV2_LRS` or `PremiumV2_ZRS` recommended for high-throughput logging (SSD provisioned v2); `Premium_LRS` or `Premium_ZRS` also supported (SSD provisioned v1) |
177262
| **Region constraints** | Deploy storage account in the same region as AKS cluster for optimal latency |
178263

179264
Azure Files can serve as a central repository for application logs, enabling log aggregation from multiple pods and providing persistent storage for log analysis tools.
@@ -188,7 +273,7 @@ metadata:
188273
spec:
189274
accessModes:
190275
- ReadWriteMany
191-
storageClassName: azurefile-csi-premium
276+
storageClassName: azurefile-csi-premiumv2-custom
192277
resources:
193278
requests:
194279
storage: 100Gi
@@ -240,87 +325,6 @@ kubectl exec ds/log-collector -- ls -la /logs
240325
# Expected: directory listing with log files
241326
```
242327

243-
## Dynamic provisioning: auto-create Azure file shares
244-
245-
Dynamic provisioning automatically creates Azure file shares when you create a persistent volume claim. Verify your environment meets these requirements:
246-
247-
| Requirement | Details |
248-
|-------------|----------|
249-
| **AKS version** | 1.21 or later |
250-
| **CSI driver version** | v1.0.0 or later (preinstalled on AKS 1.21+) |
251-
| **Supported node pools** | Linux: SMB and NFS protocols; Windows: SMB protocol only |
252-
| **Role assignments** | AKS cluster identity requires Storage Account Contributor role; for private endpoints, also requires Private DNS Zone Contributor |
253-
| **SKU options** | Standard: Standard_LRS (locally redundant), Standard_GRS (geo-redundant, includes read access as RA-GRS), Standard_ZRS (zone-redundant), Standard_GZRS (geo-zone-redundant, includes read access as RA-GZRS); Premium: Premium_LRS, Premium_ZRS |
254-
| **Region constraints** | NFS protocol requires premium file shares and a virtual network-enabled storage account; ZRS requires availability zone support |
255-
256-
With dynamic provisioning, storage is automatically created when a persistent volume claim is created. The Azure Files CSI driver supports dynamic provisioning through Kubernetes storage classes.
257-
258-
### Prerequisites for dynamic provisioning
259-
260-
Ensure the following are in place before creating a StorageClass for dynamic provisioning:
261-
262-
- AKS cluster version 1.21 or later
263-
- Linux node pool (for NFS) or Linux/Windows node pool (for SMB)
264-
- AKS cluster identity with **Storage Account Contributor** role on the resource group
265-
- For NFS: Premium SKU storage account with virtual network service endpoint enabled
266-
- For private endpoints: **Private DNS Zone Contributor** role on the private DNS zone
267-
268-
### Steps to configure dynamic provisioning
269-
270-
1. **Create the StorageClass** – Define the provisioning parameters (SKU, protocol, mount options).
271-
2. **Create a PersistentVolumeClaim (PVC)** – Reference the StorageClass; the CSI driver auto-creates the Azure file share.
272-
3. **Deploy your workload** – Mount the PVC in your pod spec.
273-
4. **Verify** – Confirm PVC is `Bound` and the mount path is accessible.
274-
275-
### StorageClass parameters for dynamic provisioning
276-
277-
Use these parameters when defining a StorageClass for Azure Files dynamic provisioning:
278-
279-
| Parameter | Value | Description |
280-
|-----------|-------|-------------|
281-
| `provisioner` | `file.csi.azure.com` | Azure Files CSI driver identifier |
282-
| `parameters.skuName` | `Premium_LRS`, `Premium_ZRS`, `Standard_LRS`, `Standard_ZRS`, `Standard_GRS`, `Standard_GZRS` | Storage redundancy and tier |
283-
| `parameters.protocol` | `smb` or `nfs` | NFS requires Premium SKU and Linux nodes |
284-
| `allowVolumeExpansion` | `true` / `false` | Enable online volume resize |
285-
| `reclaimPolicy` | `Delete` / `Retain` | Action when PVC is deleted |
286-
| `volumeBindingMode` | `Immediate` / `WaitForFirstConsumer` | When to provision storage |
287-
288-
This YAML defines a storage class (Kubernetes provisioning template) for dynamic provisioning of SSD (premium) Azure file shares with SMB protocol. For Linux mount options, see [SMB mount options reference](#smb-mount-options-reference-linux).
289-
290-
```yaml
291-
apiVersion: storage.k8s.io/v1
292-
kind: StorageClass
293-
metadata:
294-
name: azurefile-csi-premium
295-
provisioner: file.csi.azure.com
296-
parameters:
297-
skuName: Premium_LRS
298-
protocol: smb
299-
allowVolumeExpansion: true
300-
mountOptions:
301-
# Canonical permissions: 0755/uid=1000/gid=1000 for least privilege.
302-
# Use 0777/uid=0/gid=0 only if app requires root or broad write access.
303-
- dir_mode=0755
304-
- file_mode=0755
305-
- uid=1000
306-
- gid=1000
307-
- mfsymlinks
308-
- cache=strict
309-
- actimeo=30
310-
```
311-
312-
**Verify StorageClass:**
313-
314-
```bash
315-
# Check StorageClass exists
316-
kubectl get sc azurefile-csi-premium -o jsonpath="{.provisioner}"
317-
# Expected: file.csi.azure.com
318-
319-
# Test dynamic provisioning with a PVC (replace with your PVC name)
320-
kubectl get pvc <YOUR_PVC_NAME, e.g., my-azurefile-pvc> -o jsonpath="{.status.phase}"
321-
# Expected: Bound (after creating a PVC referencing this StorageClass)
322-
```
323-
324328
## Static provisioning: use existing Azure file shares
325329

326330
Static provisioning connects to preexisting Azure file shares. Verify your environment meets these requirements:
@@ -344,7 +348,7 @@ Ensure the following are in place before creating a PersistentVolume for static
344348
- Linux node pool (for NFS) or Linux/Windows node pool (for SMB)
345349
- Preexisting Azure storage account and file share
346350
- For SMB: Kubernetes Secret containing `azurestorageaccountname` and `azurestorageaccountkey`
347-
- For NFS: Storage account with Premium SKU and virtual network service endpoint; no secret required
351+
- For NFS: Storage account with SSD file shares (such as `PremiumV2_LRS` or `Premium_LRS`) and virtual network service endpoint; no secret required
348352
- Network connectivity from AKS nodes to the storage account (public endpoint, service endpoint, or private endpoint)
349353

350354
### Steps to configure static provisioning
@@ -471,17 +475,17 @@ Ensure the following are in place before configuring private endpoints for Azure
471475
5. **Deploy your workload** – Mount the PVC in your pod spec.
472476
6. **Verify** – Confirm the PVC binds and that DNS resolves to a private IP (`nslookup <storageaccount>.file.core.windows.net`).
473477

474-
This YAML example demonstrates how to create Azure file storage with private endpoint configuration for enhanced security. For Linux mount options, see [SMB mount options reference](#smb-mount-options-reference-linux).
478+
This YAML example demonstrates how to create Azure file storage with private endpoint configuration for enhanced security. The CSI driver automatically discovers the virtual network from the AKS cluster configuration, so `vnetResourceGroup`, `vnetName`, and `subnetName` are optional if the virtual network is in the same resource group as the AKS cluster. Specify them explicitly for cross-resource-group or multi-VNet scenarios. For Linux mount options, see [SMB mount options reference](#smb-mount-options-reference-linux).
475479

476480
```yaml
477481
apiVersion: storage.k8s.io/v1
478482
kind: StorageClass
479483
metadata:
480-
name: azurefile-csi-private
484+
name: azurefile-csi-private-custom
481485
provisioner: file.csi.azure.com
482486
allowVolumeExpansion: true
483487
parameters:
484-
skuName: Premium_LRS
488+
skuName: PremiumV2_LRS # SSD provisioned v2 (recommended). Alternatives: Premium_LRS (SSD v1), StandardV2_LRS (HDD v2)
485489
networkEndpointType: privateEndpoint
486490
reclaimPolicy: Delete
487491
volumeBindingMode: Immediate
@@ -503,7 +507,7 @@ mountOptions:
503507

504508
```bash
505509
# Check StorageClass exists with private endpoint
506-
kubectl get sc azurefile-csi-private -o jsonpath="{.parameters.networkEndpointType}"
510+
kubectl get sc azurefile-csi-private-custom -o jsonpath="{.parameters.networkEndpointType}"
507511
# Expected: privateEndpoint
508512
509513
# After creating a PVC, verify private endpoint connectivity
@@ -513,5 +517,6 @@ kubectl get pvc <YOUR_PVC_NAME, e.g., secure-pvc> -o jsonpath="{.status.phase}"
513517

514518
## See also
515519

520+
- [Scalability and performance targets for Azure Files](storage-files-scale-targets.md)
516521
- [Use Azure Files CSI driver in AKS](/azure/aks/azure-files-csi)
517522
- [Create and use a volume with Azure Files in AKS](/azure/aks/azure-csi-files-storage-provision)

0 commit comments

Comments
 (0)