For the Cassandra database, hybrid runtime uses
dynamically created persistent volumes to store data. To configure
Cassandra properly, you must configure a StorageClass
definition that is backed by a solid-state drive (SSD).
This topic explains how to create a new StorageClass that uses SSD and make it the
default class. When Cassandra starts, it will use this default StorageClass.
Change the default StorageClass
The following steps explain how to create a StorageClass and make it the default class. For more
information, see
Change the default storage class in the Kubernetes documentation.
Get the name of the current default StorageClass:
kubectl get sc
For example:
kubectl get sc
NAME PROVISIONER RECLAIMPOLICY
VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
premium-rwo pd.csi.storage.gke.io Delete
WaitForFirstConsumer true 40m
standard (default) kubernetes.io/gce-pd Delete
Immediate true 40m
standard-two pd.csi.storage.gke.io Delete
WaitForFirstConsumer true 40m
Describe the StorageClass named standard. Note that its
type is pd-standard:
Add this code to the file. Note that the name of the new class
is apigee-sc. You can use any name you like. Also, note that
the storage type is pd-ssd:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThis documentation version (1.7) is end-of-life and users should upgrade to a newer, supported version.\u003c/p\u003e\n"],["\u003cp\u003eApigee hybrid runtime uses dynamically created persistent volumes for the Cassandra database, which require proper configuration.\u003c/p\u003e\n"],["\u003cp\u003eFor optimal performance, the StorageClass used by Cassandra must be backed by a solid-state drive (SSD).\u003c/p\u003e\n"],["\u003cp\u003eA new StorageClass, such as the example \u003ccode\u003eapigee-sc\u003c/code\u003e, can be created with an SSD backend and designated as the default StorageClass in Kubernetes.\u003c/p\u003e\n"],["\u003cp\u003eChanging the default StorageClass involves creating a new StorageClass, patching the old default class to no longer be default, and patching the new one to be default.\u003c/p\u003e\n"]]],[],null,["# StorageClass configuration\n\n| You are currently viewing version 1.7 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\n\nFor the Cassandra database, hybrid runtime uses\n[dynamically created](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic) persistent volumes to store data. To configure\nCassandra properly, you must configure a [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes)\ndefinition that is backed by a solid-state drive (SSD).\n\n\nThis topic explains how to create a new StorageClass that uses SSD and make it the\ndefault class. When Cassandra starts, it will use this default StorageClass.\n| **KEY POINT:** For performance reasons, it is important that the StorageClass uses an SSD backend.\n\nChange the default StorageClass\n-------------------------------\n\n\nThe following steps explain how to create a StorageClass and make it the default class. For more\ninformation, see [Change the default storage class](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/) in the Kubernetes documentation.\n\n1. Get the name of the current default StorageClass: \n\n ```\n kubectl get sc\n ```\n\n\n For example: \n\n kubectl get sc\n NAME PROVISIONER RECLAIMPOLICY\n VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE\n premium-rwo pd.csi.storage.gke.io Delete\n WaitForFirstConsumer true 40m\n standard (default) kubernetes.io/gce-pd Delete\n Immediate true 40m\n standard-two pd.csi.storage.gke.io Delete\n WaitForFirstConsumer true 40m\n\n2. Describe the StorageClass named `standard`. Note that its type is `pd-standard`: \n\n ```\n kubectl describe sc standard\n ```\n\n\n For example: \n\n kubectl describe sc standard\n Name: standard\n IsDefaultClass: Yes\n Annotations: storageclass.beta.kubernetes.io/is-default-class=true\n Provisioner: kubernetes.io/gce-pd\n Parameters: type=pd-standard\n AllowVolumeExpansion: \u003cunset\u003e\n MountOptions: \u003cnone\u003e\n ReclaimPolicy: Delete\n VolumeBindingMode: Immediate\n Events: \u003cnone\u003e\n\n3. Create a new file called `storageclass.yaml`.\n4. Add this code to the file. Note that the name of the new class is `apigee-sc`. You can use any name you like. Also, note that the storage type is `pd-ssd`: \n\n ```carbon\n ---\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: \"apigee-sc\"\n provisioner: pd.csi.storage.gke.io\n parameters:\n type: pd-ssd\n replication-type: none\n volumeBindingMode: WaitForFirstConsumer\n allowVolumeExpansion: true\n ```\n5. Apply the new StorageClass to your Kubernetes cluster: \n\n ```\n kubectl apply -f storageclass.yaml\n ```\n6. Execute the following two commands to change the default StorageClass: \n\n ```\n kubectl patch storageclass standard \\\n -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"false\"}}}'\n ``` \n\n ```\n kubectl patch storageclass apigee-sc \\\n -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}'\n ```\n7. Execute this command to verify that the new default StorageClass is called `apigee-sc`: \n\n ```\n kubectl get sc\n ```\n\n\n For example: \n\n kubectl get sc\n NAME PROVISIONER RECLAIMPOLICY\n VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE\n apigee-sc (default) pd.csi.storage.gke.io Delete\n WaitForFirstConsumer true 67s\n premium-rwo pd.csi.storage.gke.io Delete\n WaitForFirstConsumer true 49m\n standard kubernetes.io/gce-pd Delete\n Immediate true 49m\n standard-rwo pd.csi.storage.gke.io Delete\n WaitForFirstConsumer true 49m"]]