Mit diesem Prozess können Sie die nichtflüchtigen Volumes, die von der Apigee Hybrid Cassandra-Datenbank verwendet werden, erweitern, um größere Speicheranforderungen zu erfüllen, ohne neue Knoten erstellen zu müssen, um mehr Speicher bereitzustellen.
Die Apigee Hybrid cassandra-Komponente verwendet nichtflüchtige Volumes zum Speichern von Daten. Die Größe des nichtflüchtigen Volumes wird während Installation und Erstkonfiguration definiert. Diese anfängliche Speichergröße ist ein unveränderlicher Wert. Er kann nicht geändert werden. Daher verwendet jeder dem Cluster neu hinzugefügte Knoten den gleichen nichtflüchtigen Speicherumfang.
Es ist möglich, die Größe des vorhandenen nichtflüchtigen Volumes zu erhöhen. Dazu wenden Sie die Änderungen direkt auf die Nichtflüchtige Volume-Anforderung an. Für neue Knoten wird jedoch weiterhin die kleinere anfängliche Größe des nichtflüchtigen Volumes verwendet.
Wenn Ihre Hybrid-Cassandra-Datenbank sich der Grenze ihrer Speicherkapazität nähert, können Sie dieses Verfahren verwenden, um die vorhandenen nichtflüchtigen Volumes zu erweitern und es auch neuen Knoten zu erlauben, sich zu erweitern.
Prozess
Bevor Sie mit der Erweiterung des nichtflüchtigen Volumes fortfahren, prüfen Sie, ob allowVolumeExpansion: true beim Erstellen der StorageClass festgelegt wurde:
kubectl get sc standard -o json | jq .allowVolumeExpansion true
Aktualisieren Sie die Volume-Größe für die vorhandene Konfiguration des nichtflüchtigen Volumes (PVC, Persistent Volume Configuration):
kubectl -n apigee edit pvc
Löschen Sie das StatefulSet, ohne das kaskadierende Löschen zu verwenden:
Aktualisieren Sie die Datei „overrides.yaml“ und wenden Sie die Änderungen an:
cassandra:storage:capacity:20Gi
./apigeectl apply -c cassandra -f overrides.yaml
Bei einem rollierenden Neustart der Cassandra-Pods wird die neue Größe berücksichtigt. Löschen Sie die Cassandra-Pods einzeln. Prüfen Sie, ob das StatefulSet fehlerfrei ist, bevor Sie mit den nächsten Knoten fortfahren:
kubectl -n apigee delete pod apigee-cassandra-2
kubectl -n apigee get sts
NAME READY AGE
apigee-cassandra 3/3 64s
Prüfen Sie, ob die Cassandra-Pods die neue Volume-Größe haben:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[[["\u003cp\u003eThe Apigee hybrid documentation version 1.2 is end-of-life, and users should upgrade to a newer version for continued support and updates, as detailed in the supported versions documentation.\u003c/p\u003e\n"],["\u003cp\u003eYou can expand the storage capacity of the Apigee hybrid Cassandra database by increasing the size of existing persistent volumes without needing to create new nodes for storage alone.\u003c/p\u003e\n"],["\u003cp\u003eTo expand the persistent volume, ensure \u003ccode\u003eallowVolumeExpansion\u003c/code\u003e is set to true in the StorageClass, update the Persistent Volume Claim (PVC) size, and then update the overrides.yaml file with the new capacity.\u003c/p\u003e\n"],["\u003cp\u003eAfter updating the PVC and \u003ccode\u003eoverrides.yaml\u003c/code\u003e, delete the Cassandra statefulset without cascading, apply the updated configuration, and then perform a rolling restart of the Cassandra pods to apply the changes.\u003c/p\u003e\n"],["\u003cp\u003eAfter all the changes are applied, verify the pods are correctly initialized and the new volume size is visible in the persistent volume claims.\u003c/p\u003e\n"]]],[],null,["# Expand Cassandra persistent volumes\n\n| You are currently viewing version 1.2 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis process allows you to expand the persistent volumes used by the Apigee hybrid Cassandra\ndatabase to accommodate greater storage needs without needing to create new nodes just to provide\nmore storage.\n\nThe Apigee hybrid `cassandra` component uses persistent volumes to store data. The size\nof the persistent volume is defined during installation and initial configuration. This initial\nstorage size is an immutable value and cannot be changed. Therefore, any new node added to the cluster\nwill use the same persistent volume size.\n\nIt is possible to increase the size of the existing persistent volume by making the changes directly on\nthe Persistent volume Claim, but new nodes will still use the smaller initial persistent volume size.\n\nIf your hybrid Cassandra database is nearing its storage capacity, you can use this procedure\nto expand the existing persistent volumes and allow new nodes to expand their persistent volumes as\nwell.\n\nProcess\n-------\n\n1. Before proceeding with the Persistent volume expansion, make sure \"`allowVolumeExpansion: true`\" is set on the StorageClass when it is created: \n\n ```\n kubectl get sc standard -o json | jq .allowVolumeExpansion true\n ```\n2. Update the Volume size for the existing Persistent Volume Configuration (PVC): \n\n ```\n kubectl -n apigee edit pvc \n ```\n3. Delete the statefulset without cascading deletion: \n\n ```\n kubectl -n apigee delete sts --cascade=false apigee-cassandra\n ```\n4. Update the overrides.yaml and apply the changes: \n\n ```actionscript-3\n cassandra:\n storage:\n capacity: 20Gi\n ``` \n\n ```\n ./apigeectl apply -c cassandra -f overrides.yaml\n ```\n5. 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: \n\n kubectl -n apigee delete pod apigee-cassandra-2\n kubectl -n apigee get sts\n NAME READY AGE\n apigee-cassandra \u003cvar translate=\"no\"\u003e3/3\u003c/var\u003e 64s\n\n6. Verify the Cassandra pods are coming up with the new volume size: \n\n ```\n kubectl -n apigee get pvc\n ```"]]