I created a PVC and then tried to expand the size of the volume claim.
Volume expansion is set to true as below:
minikube kubectl -- get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
fast kubernetes.io/gce-pd Delete Immediate true 55m
standard (default) k8s.io/minikube-hostpath Delete Immediate true 156m
I patched the PVC using kubectl edit.
When I described the PVC I get the below message:
Normal ExternalProvisioning 93s (x177 over 61m) persistent volume-controller waiting for a volume to be created, either by external provisioner "pd.csi.storage.gke.io" or manually created by the system administrator.
Should I create a volume here? Please Help. Please refer this code to reproduce the issue.
It seems you are creating a PVC using a GKE provision, in this case, you don't need to create PV, only PVC example:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: volume-name
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
Google is only allowing ReadWriteOnce
and ReadOnlyOnce
for this type of dynamic provisioning yet. Basically, after applying this config you still need to create a pod to consume this volume. After this the creation and bind are complete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With