AKS restore actually restores Azure File Shares- PVs

Iliana Tzima 0 Reputation points
2025-04-12T07:02:40.78+00:00

https://learn.microsoft.com/en-us/azure/backup/azure-kubernetes-service-cluster-backup-support-matrix

In my last attempts to restore an AKS cluster with Persistent Volumes which were actually Azure File Shares, using Azure AKS backup process, I was surprised when PVs were brought back after restore.

PVC names were there as well without the actual definition of PVCs. PVCs can be easily deployed afterwards from yaml files. From the documentation I assumed that only Azure Disks could be recovered and not Azure File Shares as PVCs. Of course we use azure files csi driver on this cluster.

So, please let me know if Azure File Shares are consistent and if that is the case or my assumption is wrong.

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,460 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pramidha Yathipathi 1,135 Reputation points Microsoft External Staff Moderator
    2025-04-17T06:06:43.93+00:00

    Hi Iliana Tzima,

    By default, Azure Backup for AKS includes both the data (disk snapshots for PVs) and the configuration (Kubernetes resource definitions) for Persistent Volume Claims (PVCs). There’s no implicit exclusion of PVCs—you must explicitly annotate any PVC you want to skip.

    Azure Backup’s Backup configurations enable persistent volumes (and their claims) by default. Namespaced resources like PVCs are treated as part of the cluster resources to back up unless you exclude them

    https://learn.microsoft.com/en-us/azure/backup/azure-kubernetes-service-cluster-backup

    Azure Backup for AKS currently supports only CSI driver–based Azure Disk volumes. Azure File Shares (and Blob Storage PVs) are skipped during AKS backups because there’s no CSI snapshot capability for those drivers in AKS Backup.

    https://learn.microsoft.com/en-us/azure/backup/azure-kubernetes-service-cluster-backup-support-matrix

    When you perform an AKS restore, the built‑in options let you restore cluster‑scoped resources and persistent volumes (Azure Disk only). PVCs are namespaced resource definitions, and unless you explicitly include them via the restore configuration filters (API Groups/Kinds), only the PV snapshots and cluster‑scoped objects are rehydrated.

    In the Restore configurations pane, you see checkboxes for “cluster scoped resources” and “persistent volumes (Azure Disk only)”. Selecting those restores only the PV snapshots and any cluster‑scoped objects (like PVs), not the PVC objects themselves

    If a PVC with the same name already exists in the target cluster, the default “Skip” behavior will skip restoring that PVC. You must delete the existing PVC (or choose “Patch”) to have the backed‑up PVC definition applied.

    https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/backup/azure-kubernetes-service-cluster-restore.md

    CSI Limitations:

    https://learn.microsoft.com/en-us/azure/aks/azure-files-csi

    Let me know if you have any further queries!

    If you found the information useful, please click "Upvote" on the post to let us know.

    Thank You.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.