1 Resizing local storage volumes
Steffo edited this page 2026-08-12 18:06:48 +02:00

Resizing local storage volumes

Once a local storage volume has been created, it cannot be resized only by editing its PersistentVolumeClaim.

You also need to manually modify the size of the associated PersistentVolume by pushing a new manifest.

Example

For example, to increase Forgejo's PostgreSQL volume size, it wasn't enough to increase spec.storage.size in the Cluster:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster

metadata:
  namespace: starshard-forgejo
  name: "postgresql"

spec:
  # ...
  storage:
    size: 2Gi

But the created PersistentVolume's spec.capacity.storage had to be increased accordingly:

apiVersion: v1
kind: PersistentVolume

metadata:
  name: pvc-d65beda3-8ea7-45a1-b202-166be0e87caa

spec:
  capacity:
    storage: 2Gi