storageclass.storage.k8s.io ### not found3.2
The StorageClass specified in the PVC's storageClassName field does not exist in the Kubernetes cluster. This prevents the provisioner from dynamically creating the Persistent Volume (PV).
To resolve this issue, the missing StorageClass must be created. If a similar valid StorageClass exists (such as the default vsphere-sc), its configuration can be used as a template.
kubectl get sc
kubectl get sc vsphere-sc -o yaml > new-sc.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: # <--- Update this to the required name
provisioner: csi.vsphere.vmware.com
parameters:
storagePolicyName: "Tanzu Storage Policy"
kubectl apply -f new-sc.yaml
kubectl get pvc