Expand PersistentVolumes

To give Redpanda brokers more storage, you can expand the size of PersistentVolumes. The way you expand PersistentVolumes depends on the provisioner that you use.

Some storage operations may cause temporary disruptions to your service or require the restart of associated Pods. Plan these operations during maintenance windows or times of low usage.

Expand PersistentVolumes that use static provisioners

The process of resizing PersistentVolumes that use a static provisioner varies depending on the way your file system is allocated. Follow the recommended process for your system. You do not need to make any configuration changes to the Redpanda Helm chart or your Redpanda custom resource.

Expand PersistentVolumes that use dynamic provisioners

To expand a PersistentVolume that uses a dynamic provisioner, you can reconfigure the Redpanda Helm chart to increase the size specification of your Pods' PersistentVolumeClaims (PVCs). Before making this change, make sure that your StorageClass is capable of volume expansions. For a list of volumes that support volume expansion, see the Kubernetes documentation.

When you increase the size of a PVC connected to a StatefulSet, only new Pods recognize the changed PVC size. Existing Pods remain associated with the original PVC size. Manual intervention is necessary to modify the size of PVCs for existing Pods. Not all storage drivers recognize and act upon such modifications. Before making any changes, ensure your storage driver supports this operation.

Expand PersistentVolumes for the Redpanda data directory

  • Helm + Operator

  • Helm

redpanda-cluster.yaml
apiVersion: cluster.redpanda.com/v1alpha1
kind: Redpanda
metadata:
  name: redpanda
spec:
  chartRef: {}
  clusterSpec:
    storage:
      persistentVolume:
        enabled: true
        size: <custom-size>Gi
kubectl apply -f redpanda-cluster.yaml --namespace <namespace>
  • --values

  • --set

persistentvolume-size.yaml
storage:
  persistentVolume:
    enabled: true
    size: <custom-size>Gi
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --values persistentvolume-size.yaml --reuse-values
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --set storage.persistentVolume.enabled=true \
  --set storage.persistentVolume.size=<custom-size>Gi

Expand PersistentVolumes for the Tiered Storage cache

  • Helm + Operator

  • Helm

redpanda-cluster.yaml
apiVersion: cluster.redpanda.com/v1alpha1
kind: Redpanda
metadata:
  name: redpanda
spec:
  chartRef: {}
  clusterSpec:
    storage:
      tieredStoragePersistentVolume:
        enabled: true
        size: <custom-size>Gi
kubectl apply -f redpanda-cluster.yaml --namespace <namespace>
  • --values

  • --set

persistentvolume-size.yaml
storage:
  tieredStoragePersistentVolume:
    enabled: true
    size: <custom-size>Gi
helm upgrade --install redpanda redpanda/redpanda --namespace <namespace> --create-namespace \
  --values persistentvolume-size.yaml --reuse-values
helm upgrade --install redpanda redpanda/redpanda \
  --namespace <namespace> \
  --create-namespace \
  --set storage.tieredStoragePersistentVolume.enabled=true \
  --set storage.tieredStoragePersistentVolume.size=<custom-size>Gi