ok, so I know this really seams like a silly question, however I am trying to wrap my head around this idea. My experience is coming from Digital Ocean when when you provision a pvc, you automatically get a block storage device from DO.
I see that happening on my cluster using longhorn. Here is the issue, when I try to go to expand the pvc it gives me a error saying that it cant expand a dynamically created pvc.
Ok now this make sense, because the underlying block is the same size as the pvc. So we can’t expand the block(pv) from k8s.
So reading more I find longhorn-static as a storageclass. I manually created a 20gi block/pv using the longhorn ui. Then I go into k8s and create a pvc with the following:
piVersion: v1 kind: PersistentVolumeClaim metadata: name: brad-pvc namespace:user spec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi volumeName: testvolume storageClassName: longhorn-static volumeMode: Filesystem
This works fine. However I am still not able to expand the PVC even though the underlying pv is 20g. What am I missing? thanks for having a look, any suggestions are welcome.