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.
- 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
- Update the Volume size for the existing Persistent Volume Configuration (PVC):
kubectl -n apigee edit pvc
- Delete the statefulset without cascading deletion:
kubectl -n apigee delete sts --cascade=false apigee-cassandra
- Update the overrides.yaml and apply the changes:
cassandra: storage: capacity: 20Gi
./apigeectl apply -c cassandra -f overrides.yaml
- 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
- Verify the Cassandra pods are coming up with the new volume size:
kubectl -n apigee get pvc