The PVC is stuck in a pending state in the Azure OpenShift cluster

59 views Asked by At

After provisioning an OpenShift cluster using the steps outlined in https://learn.microsoft.com/en-us/azure/openshift/tutorial-create-cluster and successfully deploying my application, I attempted to set up an Azure Files storage class as per the instructions provided in https://learn.microsoft.com/en-us/azure/openshift/howto-create-a-storageclass. Although the storage class was created without any issues, the PVC remains stuck in a pending state when I attempt to create it.

This is my storage class definition

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: azure-file
provisioner: file.csi.azure.com
mountOptions:
  - dir_mode=0777
  - file_mode=0777
  - uid=0
  - gid=0
  - mfsymlinks
  - cache=strict
  - actimeo=30
  - noperm
parameters:
  location: westeurope
  skuName: Standard_LRS
  storageAccount: <storage-account-name?
  resourceGroup: <rg-name>
  secretNamespace: kube-system // also tried with my custom namespace
  secretName: azure-storage-creds
  server: <storage-account>.file.core.windows.net
reclaimPolicy: Delete
volumeBindingMode: Immediate

This is my PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: storage-test
  namespace: test
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  volumeName: test-pv
  storageClassName: azure-file
  volumeMode: Filesystem

Following the documentation, a secret should have been created after setting up the storage class but its not created and the PVC is still stuck in Pending state. When I describe my PVC, it doesn't show any events

kubectl -n uipath describe pvc asrobots-test
Name:          storage-test
Namespace:     test
StorageClass:  azure-file
Status:        Pending
Volume:        test-pv
Labels:        <none>
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      0
Access Modes:
VolumeMode:    Filesystem
Used By:       <none>
Events:        <none>
0

There are 0 answers