Resize Persistent Volumes

    +
    How-to resize a persistent volume to either expand or contract storage.

    Given the existing configuration:

    apiVersion: couchbase.com/v2
    kind: CouchbaseCluster
    spec:
      volumeClaimTemplates:
      - metadata:
          name: couchbase
        spec:
          storageClassName: standard
          resources:
            requests:
              storage: 1Gi (1)
    1 You can resize the persistent storage of any pods that reference the modified persistent volume claim template. For example, to allocate more space per-pod, update the specification from 1Gi to 2Gi:
    apiVersion: couchbase.com/v2
    kind: CouchbaseCluster
    spec:
      volumeClaimTemplates:
      - metadata:
          name: couchbase
        spec:
          storageClassName: standard
          resources:
            requests:
              storage: 2Gi (1)
    1 The modification will trigger the Operator to detect that existing persistent volume claims do not match the intended size. In place upgrades are not currently available in the minimum supported version of Kubernetes. The Operator instead triggers a rolling upgrade of the affected pods.

    You can also modify the storage class and the Operator will detect and upgrade the cluster to use it.