Let's say I'm hosting my pod that uses my pvc. My pvc only provisioned 10 Gi of storage, so my pod eventually crashes because it runs out of disk space. At this point, how do I add more space?
Preferably without losing data.
I am aware of allowVolumeExpansion
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims, but I don't think my cloud provider's storage classes ibm.io/ibmc-file
, ibm.io/ibmc-block
, and vpc.block.csi.ibm.io
supports this functionality.
Sorry about this confusion. You can change the size and IOPS of your block storage as well. See link here: https://cloud.ibm.com/docs/containers?topic=containers-block_storage#block_change_storage_configuration
We will update the note.
You can update the .resources.requests.storage
field with the expected storage space.
To update you can run:
$ kubectl edit pvc <pvc_name>
You can verify this by running:
$ kubectl get pvc <pvc_name> -o yaml
This should do the work for you.
Reference: Resizing Persistent Volumes using Kubernetes
As far as I know this is not possible on ibm.io/ibmc-block
Here is the documentation for Storing data on classic IBM Cloud Block Storage.
In section Deciding on the block storage configuration we can find:
Important:
Make sure to choose your storage configuration carefully to have enough capacity to store your data. After you provision a specific type of storage by using a storage class, you cannot change the size, type, IOPS, or retention policy for the storage device. If you need more storage or storage with a different configuration, you must create a new storage instance and copy the data from the old storage instance to your new one.
However this seems to be possible for ibm.io/ibmc-file
, which is mentioned here:
Important:
After you provision a specific type of storage by using a storage class, you cannot change the type, or retention policy for the storage device. However, you can change the size and the IOPS if you want to increase your storage capacity and performance. To change the type and retention policy for your storage, you must create a new storage instance and copy the data from the old storage instance to your new one.
This is described Changing the size and IOPS of your existing storage device