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]
    A --> F[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
Secrets Store CSI Mounted external secrets and certs Not a replacement for general data storage

Example inspection commands

kubectl get pvc -A
kubectl get pv
kubectl describe pvc <pvc-name> -n <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.

See Also

Sources