Why do Pods fail to mount PersistentVolumes that were just created by the StorageClass provisioner?

Fiderer, Christian 20 Reputation points
2024-06-19T14:47:10.77+00:00

When creating PersistentVolumeClaims for storage classes provisioned by disk.csi.azure.com, the generated PersistentVolumes are bound immediately, but they are not available when starting Pods that use them. I get events like:

Warning FailedAttachVolume pod/diag-managed AttachVolume.Attach failed for volume "pvc-e63a92ef-f128-448a-bd0a-825a6aa1f5e5" : rpc error: code = Internal desc = Attach volume /subscriptions/3a9986fa-8e53-4d17-98fc-3ddf4042818b/resourceGroups/mc_cnf-ji2249-rg_cnf-ji2249_westeurope/providers/Microsoft.Compute/disks/pvc-e63a92ef-f128-448a-bd0a-825a6aa1f5e5 to instance aks-default-20624410-vmss000000 failed with could not find disk(/subscriptions/3a9986fa-8e53-4d17-98fc-3ddf4042818b/resourcegroups/mc_cnf-ji2249-rg_cnf-ji2249_westeurope/providers/microsoft.compute/disks/pvc-e63a92ef-f128-448a-bd0a-825a6aa1f5e5) in current disk list(len: 0) nor in diskMap(map[])

What is the reason for these errors?

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

Accepted answer
  1. Anveshreddy Nimmala 3,545 Reputation points Microsoft Vendor
    2024-06-26T04:50:17.5366667+00:00

    Hello Fiderer, Christian,

    check that both the StorageClass and Azure File Share are configured to use NFS explicitly.

    https://github.com/kubernetes-sigs/azurefile-csi-driver/tree/master/deploy/example/nfs

    Modify the storage class of your PVs to use a standard storage class instead of premium .since D2_V2 Virtual machine does not support premium.

    User's image

    If premium storage is necessary for your application, consider changing the VM size to one that supports Premium Storage.

    https://learn.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series#dsv2-series

    Hope this helps you.


0 additional answers

Sort by: Most helpful

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.