AKS PVC is not attached to Pod

V. Sai Krishna 0 Reputation points
2024-03-05T09:38:24.1933333+00:00

Hi folks.

I have AKS cluster. I have deployed a deployment and it triggered ndoe scaling up. Then a pod of this deployment has been scheduled on the new node. The PVC and PV created, and all are in Bound status. But it is not attached to the pod. Even though we have contributor role.

Here is the pod describe result.

Unable to attach or mount volumes: unmounted volumes=[storage], unattached volumes=[storage kube-api-access-pmmwd sc-datasources-volume config ldap]: timed out waiting for the condition

AttachVolume.Attach failed for volume "pvc-4e251a29-fa03-4d86-be36" : rpc error: code = Internal desc = Attach volume /subscriptions//resourceGroups/h_southcentralus/providers/Microsoft.Compute/disks/pvc-4e251a29-fa03-4d86-be36 to instance aks-rancher-0-1 failed with could not find disk(/subscriptions/7/resourcegroups/h_southcentralus/providers/microsoft.compute/disks/pvc-4e251a29-fa03-4d86-be36 in current disk list(len: 5) nor in diskMap(map[])

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,459 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 16,790 Reputation points MVP Moderator
    2024-03-05T10:01:43.8066667+00:00

    Hi,

    This could happen due to below reasons

    1. Disk Provisioning: The disk might not have been provisioned properly in Azure. Verify in the Azure portal whether the disk associated with the Persistent Volume Claim (PVC) exists and is in the same subscription and resource group.
    2. Node Disk Mounts: Ensure that the node (aks-rancher-0-1) is correctly configured to mount disks. Sometimes, node configuration issues can prevent it from accessing disks.
    3. Node Permission Issues: Check if the node has the necessary permissions to access disks. Ensure that the service principal used by the node has the required permissions to attach disks to the virtual machine.

    Please check below doc --> https://learn.microsoft.com/en-us/azure/aks/azure-csi-disk-storage-provision


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.