StorageClass configuration

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, seeSupported versions.

For the Cassandra database, hybrid runtime uses dynamically created persistent volumes to store data. To configure Cassandra properly, you must configure aStorageClass 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.

KEY POINT: For performance reasons, it is important that the StorageClass uses an SSD backend.

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.

  1. 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
  2. Describe the StorageClass namedstandard. Note that itstype ispd-standard:
    kubectl describe sc standard

    For example:

    kubectldescribescstandardName:standardIsDefaultClass:YesAnnotations:storageclass.beta.kubernetes.io/is-default-class=trueProvisioner:kubernetes.io/gce-pdParameters:type=pd-standardAllowVolumeExpansion:<unset>MountOptions:<none>ReclaimPolicy:DeleteVolumeBindingMode:ImmediateEvents:<none>
  3. Create a new file calledstorageclass.yaml.
  4. Add this code to the file. Note that the name of the new class isapigee-sc. You can use any name you like. Also, note that the storage type ispd-ssd:
    ---kind:StorageClassapiVersion:storage.k8s.io/v1metadata:name:"apigee-sc"provisioner:pd.csi.storage.gke.ioparameters:type:pd-ssdreplication-type:nonevolumeBindingMode:WaitForFirstConsumerallowVolumeExpansion:true
  5. Apply the new StorageClass to your Kubernetes cluster:
    kubectl apply -f storageclass.yaml
  6. Execute the following two commands to change the default StorageClass:
    kubectl patch storageclass standard \  -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
    kubectl patch storageclass apigee-sc \  -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
  7. Execute this command to verify that the new default StorageClass is calledapigee-sc:
    kubectl get sc

    For example:

    kubectl get sc  NAME                 PROVISIONER            RECLAIMPOLICY  VOLUMEBINDINGMODE    ALLOWVOLUMEEXPANSION   AGE  apigee-sc (default)  pd.csi.storage.gke.io  Delete  WaitForFirstConsumer true                   67s  premium-rwo          pd.csi.storage.gke.io  Delete  WaitForFirstConsumer true                   49m  standard             kubernetes.io/gce-pd   Delete  Immediate            true                   49m  standard-rwo         pd.csi.storage.gke.io  Delete  WaitForFirstConsumer true                   49m

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.