Closed bilal-haider-cowlar closed 3 weeks ago
@bilal-haider-cowlar you have not set the correct azure credentials for your csi driver controller pod, pls follow this guide to set for your driver controller: https://github.com/kubernetes-sigs/azurefile-csi-driver?tab=readme-ov-file#option1-provide-cloud-provider-config-with-azure-credentials
Thanks @andyzhangx for the help. I solved this problem. The issue was not with the secret creation. Real Issue was, how I was providing secret to storage class. I have to give secret to all the controllers, nodes and provisioners seperatly.
parameters:
csi.storage.k8s.io/provisioner-secret-name: azure-secret
csi.storage.k8s.io/provisioner-secret-namespace: default
csi.storage.k8s.io/node-stage-secret-name: azure-secret
csi.storage.k8s.io/node-stage-secret-namespace: default
csi.storage.k8s.io/controller-expand-secret-name: azure-secret
csi.storage.k8s.io/controller-expand-secret-namespace: default
Issue: Dynamic Provisioning Failure for Azure File Share on Bare Metal Azure VM Kubeadm Setup
What happened:
Dynamic provisioning of an Azure File share on Azure VMs is failing with the error:
Warning ProvisioningFailed 1s (x285 over 18h) file.csi.azure.com_ros-practice-k8s-worker-1_42d233c3-42e7-43e6-a211-4c59f1fe4944 failed to provision volume with StorageClass "dynamic-vernemq-sc": rpc error: code = Internal desc = clientFactory is nil
What you expected to happen:
The PersistentVolumeClaim (PVC) should be dynamically provisioned with the specified StorageClass (
dynamic-vernemq-sc
) and be accessible across multiple nodes.How to reproduce it:
Anything else we need to know?:
The CSI driver appears to be installed correctly:
kubectl get po -n kube-system -o yaml | grep mcr | grep azurefile
Output:
More Information: My azure secret is correct that I made using storage accound name & key because I am able to create static volumes using it. I have tried all the oficial documentation . My pvc gives me this error of client factory nil and it remains in pending state. Maybe the issue is with specific azure VMs. I can't go to AKS becuase it is unavaible in my region. I made secret using this command:
kubectl create secret generic azure-secret --from-literal=azurestorageaccountname=myAKSStorageAccount --from-literal=azurestorageaccountkey=$STORAGE_KEY
Environment:
kubectl version
): v1.31.2