Use Azure Files for Azure Kubernetes Workloads

Here’s a concise summary of the article "Azure Files guidance for Azure Kubernetes Service (AKS) workloads":

High-level overview

  • Azure Files offers fully managed SMB and NFS file shares that can be used as persistent, shared storage for AKS container workloads.

  • It enables stateful applications and scenarios where multiple pods need concurrent access to the same files.

Why use Azure Files with AKS

  • Persistent shared storage that survives pod restarts, node failures, and cluster scaling.

  • Native Kubernetes integration via the Azure Files CSI driver (PV/PVC, StorageClass).

  • Enterprise-grade performance and security (encryption at rest/in transit, Microsoft Entra ID integration, compliance).

  • Supports Linux and Windows containers through SMB and NFS protocols.

  • SSD (Premium) and HDD (Standard) SKUs; use SSD in the same region as AKS for best performance.

Azure Files CSI driver

  • Implements the CSI spec to connect Azure Files to Kubernetes.

  • Components: CSI driver pods (DaemonSet), CSI controller, StorageClasses, PVs, PVCs.

  • Capabilities: dynamic provisioning, volume expansion, snapshots, cross-platform compatibility.

  • Works by creating or attaching Azure file shares on PVC requests and mounting them into pod filesystems.

Common use cases

  • Shared configuration and secrets distribution across pods.

  • Centralized log aggregation and persistent log storage.

  • Content/media storage and content management systems.

  • Batch processing / ETL pipelines that share input/output data.

  • Development and test environments with shared storage needs.

Provisioning options

  • Dynamic provisioning: storage is created automatically via a StorageClass (example shows a Premium_LRS SMB StorageClass).

  • Static provisioning: create PVs that reference pre-existing file shares (example shows PV referencing existing share with volumeAttributes).

Recommended mount options and examples

  • Example mount options provided (dir/file modes, uid/gid, mfsymlinks, cache=strict, actimeo, nobrl) to optimize performance and compatibility.

  • YAML examples in the article demonstrate:

    • PVC + Deployment mounting for shared configuration.

    • PVC + DaemonSet for centralized log collection.

    • StorageClass for dynamic provisioning and PV for static provisioning.

Security best practice

  • Use private endpoints (networkEndpointType: privateEndpoint) to restrict storage account network access.

  • Example StorageClass shows parameters for private endpoints and recommended mountOptions for security and performance (nosharesock, nobrl, actimeo).

Links and resources

  • The article references deeper guides: "Use Azure Files CSI driver in AKS" and "Create and use a volume with Azure Files in AKS."

Last updated: 08/12/2025

If you want, I can:

  • Produce a one-page quickstart checklist for using Azure Files with AKS.

  • Convert the article’s YAML examples into a ready-to-run GitHub gist or manifest set.

  • Create a GitBook-friendly version that uses tabs/steppers for the YAML examples.

Was this helpful?