Skip to content

Storage Options

AKS supports both ephemeral and persistent storage. Match the storage pattern to workload behavior instead of assuming all containers should be stateless or all data should live on Azure Disk.

Main Content

flowchart TD
    A[Pod] --> B[emptyDir]
    A --> C[PersistentVolumeClaim]
    C --> D[Azure Disk CSI]
    C --> E[Azure Files CSI]
    C --> F[Azure Blob CSI]
    C --> G[NFS on AKS]
    A --> H[Secrets Store CSI]

Storage patterns

Option Best For Notes
emptyDir Scratch space, caches, temporary processing Lost when pod is rescheduled
Azure Disk CSI Single-writer durable state Strong fit for databases requiring block storage
Azure Files CSI Shared file access across pods Easier RWX semantics, different performance model
Azure Blob CSI Large unstructured datasets Mount path over object storage, not a transactional disk substitute
NFS on AKS Linux shared-state patterns Choose between Azure Files NFS, Azure NetApp Files, or an exception-path self-hosted NFS design
Secrets Store CSI Mounted external secrets and certs Not a replacement for general data storage

Stateful storage design questions

Use these questions to narrow the decision quickly:

  • Does only one pod instance write to the volume at a time? Start with Azure Disk CSI.
  • Do multiple pods or nodes need concurrent file access? Start with Azure Files CSI or another NFS path.
  • Is the data naturally object-oriented and very large? Start with Azure Blob CSI instead of forcing block semantics.
  • Do you need advanced NAS behavior or very low latency shared storage? Evaluate Azure NetApp Files.

Example inspection commands

kubectl get pvc --all-namespaces
kubectl get pv
kubectl describe pvc <pvc-name> --namespace <namespace>
kubectl get storageclass

Design cautions

  • Stateful workloads still need backup and restore design.
  • Understand zone behavior for managed disks.
  • Do not use persistent volumes as a substitute for object storage or external databases without clear reason.

AKS-specific deep dives

See Also

Sources