Forum Navigation
You need to log in to create posts and topics.

Error: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize

Problem

User tries to resize a pvc and gets the following error

error: persistentvolumeclaims “data-reportportal-db-postgresql-0” could not be patched: persistentvolumeclaims “data-reportportal-db-postgresql-0” is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize

Solution

Change the storage Class to support resizing

kubectl get sc

edit your storage class

kubectel edit sc <STORAGECLASS NAME>

Add the following settings

allowVolumeExpansion: true

Example:

reclaimPolicy: Delete
allowVolumeExpansion: true

 

If you have found my website, guides, articles or videos useful, please buy me a coffee