Closed divyenpatel closed 5 years ago
Taking a look at this...
/assign dvonthenen
Tested using the latest PR https://github.com/kubernetes/cloud-provider-vsphere/pull/136 and wasn't able to find any issues. It could be the same permissions related issue that was updated in the YAML within that PR.
[vonthd@k8smaster csi]$ kubectl create -f example-vsphere-sc.yaml
storageclass.storage.k8s.io/vsphere-fcd created
[vonthd@k8smaster csi]$ kubectl create -f example-vsphere-pvc.yaml
persistentvolumeclaim/vsphere-csi-pvc created
[vonthd@k8smaster csi]$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
vsphere-csi-pvc Bound pvc-a16daa6b-2afe-11e9-84f7-005056a741a8 5Gi RWO vsphere-fcd 7s
[vonthd@k8smaster csi]$ kubectl describe pvc vsphere-csi-pvc
Name: vsphere-csi-pvc
Namespace: default
StorageClass: vsphere-fcd
Status: Bound
Volume: pvc-a16daa6b-2afe-11e9-84f7-005056a741a8
Labels: <none>
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
volume.beta.kubernetes.io/storage-provisioner: io.k8s.cloud-provider-vsphere.vsphere
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 5Gi
Access Modes: RWO
VolumeMode: Filesystem
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ExternalProvisioning 11s (x2 over 12s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "io.k8s.cloud-provider-vsphere.vsphere" or manually created by system administrator
Normal Provisioning 10s io.k8s.cloud-provider-vsphere.vsphere_vsphere-csi-controller-0_f42e229c-2afd-11e9-bfb0-0e4231c9c60a External provisioner is provisioning volume for claim "default/vsphere-csi-pvc"
Normal ProvisioningSucceeded 8s io.k8s.cloud-provider-vsphere.vsphere_vsphere-csi-controller-0_f42e229c-2afd-11e9-bfb0-0e4231c9c60a Successfully provisioned volume pvc-a16daa6b-2afe-11e9-84f7-005056a741a8
Mounted By: <none>
[vonthd@k8smaster csi]$
PR https://github.com/kubernetes/cloud-provider-vsphere/pull/136 was merged a few days ago. Please give it a try and see if it fixes your issue. Note the instructions below.
1) reinstall the CSI driver by grabbing/updating the YAML (fixed permissions) in its deployment
2) the YAML deploys v0.1.1
of the driver… so you will need to change the image to latest
within the YAML in 2 places until a new tag becomes available
3) fairly detailed documentation was created for multi-vc/dc and zones support: https://github.com/kubernetes/cloud-provider-vsphere/blob/master/docs/deploying_ccm_and_csi_with_multi_dc_vc_aka_zones.md
Issue is resolved after removing Initializers
from enable-admission-plugins
flag on API server and removing initializerconfiguration.admissionregistration.k8s.io/pvlabel.kubernetes.io
.
I was following instruction mentioned below
I can now see PV and PVC are in the bound state
# kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
my-vsphere-csi-pvc Bound pvc-48a3a1e3-3177-11e9-a630-00505690e9f4 5Gi RWO my-vsphere-fcd-class 14m
# kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-48a3a1e3-3177-11e9-a630-00505690e9f4 5Gi RWO Delete Bound default/my-vsphere-csi-pvc my-vsphere-fcd-class 13m
Also made sure pod is up and running using the volume provisioned using vSpehre CSI driver.
# kubectl get pods
NAME READY STATUS RESTARTS AGE
my-csi-app 1/1 Running 0 13m
Is this a BUG REPORT or FEATURE REQUEST?:
What happened: Dynamically provisioned Persistence Volume is not getting bound with its PV Claim.
Storage Class
Persistence Volume Claim
PV Claim and PV remains in the Pending State and does not get bound.
Logs
csi-provisioner logs
vsphere-csi-controller logs
kube-controller-manager logs
What you expected to happen:
PV Claim should get bind with dynamically created PV.
Environment:
kube-controller-manager:
k8s.gcr.io/kube-controller-manager:v1.13.2
vsphere-csi-controller:
quay.io/k8scsi/csi-provisioner:v1.0.1
vsphere-cloud-controller-manager:
gcr.io/cloud-provider-vsphere/vsphere-cloud-controller-manager:latest
vsphere-csi-node:
quay.io/k8scsi/csi-node-driver-registrar:v1.0.1