Use of AzureFile on kubernetes version 1.22.x is failing

James Landy 1 Reputation point
2022-01-10T21:41:30.233+00:00

I have used Azure Files share to create volumes on my clusters and have always work with kubernetes version 1.19.x, 1.20.x, 1.21.x, meaning this has worked anytime I updated my environment to a new version until now with 1.22.x I started seeing mount points being attached time out.
I have had data-mount and python-volume defined to use the same fileshare and it had worked on all other kubernetes versions but for k8 1.22.4
Reason I'm pointing this out, I had someone pointed to me this was the issue

  • azureFile:
    readOnly: true
    secretName: storage-secret
    shareName: cltds
    name: python-volume
    • azureFile:
      readOnly: false
      secretName: storage-secret
      shareName: cltds
      name: data-mount

Has anything changed with Azure File Share in k8 1.22.x

Warning FailedMount 43m kubelet, aks-cas-10746455-vmss000001 Unable to attach or mount volumes: unmounted volumes=[data-mount], unattached volumes=[kube-api-access-4s5h5 commonfilesvols podinfo tmp cas-default-config-volume data-mount consul-tmp-volume customer-provided-ca-certificates cas-default-permstore-volume cas-default-cache-volume retail-volume cas-tmp-volume cas-license-volume python-volume security cas-default-data-volume sss backup certframe-token]: timed out waiting for the condition

Thanks in advance,

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,277 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 18,151 Reputation points MVP
    2022-01-11T06:11:50.513+00:00

    It can be due to some stale volume attachments linked to Kubernetes node that no longer exist in the cluster. In order to fix the issue, find the Persistent Volume names which are stale and find the mapping of those to the volume attachments
    Finally remove the volume attachments using the command

    kubectl delete volumeattachment [volumeattachment_name]
    

    After doing this, the issue should be fixed.


    If the Answer is helpful, please click "Accept Answer" and upvote it


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.