PVC Events: waiting for a volume to be created, either by external provisioner "csi.vsphere.vmware.com" or manually created by system administrator [closed]
Asked Answered
D

0

9

Tried to setup vsphere-CSI-driver following below documentation.

Documentation-followed: https://www.definit.co.uk/2019/06/lab-guide-kubernetes-and-storage-with-the-vsphere-cloud-provider-step-by-step/

User/Permissions associated to VSAN and VCenter are already there.

[root@sni-k8s-Test-01 ~]# kubectl get CSIDriver
NAME                     CREATED AT
csi.vsphere.vmware.com   2021-01-15T17:39:25Z
[root@sni-k8s-Test-01 ~]# kubectl get CSINode
NAME              CREATED AT
sni-k8s-test-01   2020-08-15T18:38:36Z
sni-k8s-test-02   2020-08-15T18:52:39Z
sni-k8s-test-03   2020-08-16T16:30:44Z

this is my storage class manifest and storage class outputs.

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: csi-sc
  annotations:
    storageclass.kubernetes.io/is-default-class: "false"
provisioner: csi.vsphere.vmware.com
parameters:
   storagepolicyname: "k8s-view-k8s-spbm-profile"
   datastoreUrl :  "ds:///vmfs/volumes/5c8a4ebb-d030b1e9-cb39-484d7e0a2431"
[root@sni-k8s-Test-01 ~]# kubectl get sc
NAME     PROVISIONER              RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
csi-sc   csi.vsphere.vmware.com   Delete          Immediate           false                  4d13h

however, when i try to create a pvc, this is the following manifests and describe output associated to pvc.

[root@sni-k8s-Test-01 vmdktest]# cat example-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: example-vanilla-block-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
  storageClassName: csi-sc
[root@sni-k8s-Test-01 vmdktest]# kubectl describe pvc example-vanilla-block-pvc
Name:          example-vanilla-block-pvc
Namespace:     default
StorageClass:  csi-sc
Status:        Pending
Volume:
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner: csi.vsphere.vmware.com
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Mounted By:    example-vanilla-block-pod
Events:
  Type    Reason                Age                      From                         Message
  ----    ------                ----                     ----                         -------
  Normal  ExternalProvisioning  65s (x26291 over 4d13h)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner "csi.vsphere.vmware.com" or manually created by system administrator

Delp answered 20/1, 2021 at 7:23 Comment(2)
do you have a PV created for the PVCs to get attached to?Condorcet
thanks for your query. no, there's no associated pv created as shouldn't it dynamically create pvc associated to storage class?Delp

© 2022 - 2024 — McMap. All rights reserved.