Expand Cassandra persistent volumes

This process allows you to expand the persistent volumes used by the Apigee hybrid Cassandra database to accommodate greater storage needs without needing to create new nodes just to provide more storage.

The Apigee hybrid cassandra component uses persistent volumes to store data. The size of the persistent volume is defined during installation and initial configuration. This initial storage size is an immutable value and cannot be changed. Therefore, any new node added to the cluster will use the same persistent volume size.

It is possible to increase the size of the existing persistent volume by making the changes directly on the Persistent volume Claim, but new nodes will still use the smaller initial persistent volume size.

If your hybrid Cassandra database is nearing its storage capacity, you can use this procedure to expand the existing persistent volumes and allow new nodes to expand their persistent volumes as well.


  1. Before proceeding with the Persistent volume expansion, make sure "allowVolumeExpansion: true" is set on the StorageClass when it is created:
    kubectl get sc standard -o json | jq .allowVolumeExpansion true
  2. Update the Volume size for the existing Persistent Volume Configuration (PVC):
    kubectl -n apigee edit pvc 
  3. Delete the statefulset without cascading deletion:
    kubectl -n apigee delete sts --cascade=false apigee-cassandra
  4. Update the overrides.yaml and apply the changes:
        capacity: 20Gi
    ./apigeectl apply -c cassandra -f overrides.yaml
  5. Rolling restart the Cassandra pods to reflect the new size. Delete the Cassandra pods one at a time. Verify that the statefulset is healthy before proceeding to the next nodes:
    kubectl -n apigee delete pod apigee-cassandra-2
    kubectl -n apigee get sts
      NAME               READY   AGE
      apigee-cassandra   3/3     64s
  6. Verify the Cassandra pods are coming up with the new volume size:
    kubectl -n apigee get pvc