Untuk database Cassandra, runtime campuran menggunakan volume persisten yang
dibuat secara dinamis untuk menyimpan data. Untuk mengonfigurasi Cassandra dengan benar, Anda harus mengonfigurasi definisi StorageClass yang didukung oleh solid-state drive (SSD).
Topik ini menjelaskan cara membuat StorageClass baru yang menggunakan SSD dan menjadikannya sebagai class default. Saat dimulai, Cassandra akan menggunakan StorageClass default ini.
Mengubah StorageClass default
Langkah-langkah berikut menjelaskan cara membuat StorageClass dan menjadikannya class default. Untuk informasi
selengkapnya, lihat
Mengubah class penyimpanan default dalam dokumentasi Kubernetes.
Dapatkan nama StorageClass default saat ini:
kubectl get sc
Contoh:
kubectl get sc
NAME PROVISIONER AGE
standard (default) kubernetes.io/gce-pd 98d
Deskripsikan StorageClass bernama standard. Perhatikan bahwa
jenisnya adalah pd-standard:
Tambahkan kode ini ke file. Perhatikan bahwa nama class baru
adalah apigee-sc. Anda dapat menggunakan nama apa pun yang Anda sukai. Selain itu, perhatikan bahwa
jenis penyimpanannya adalah pd-ssd:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eThis documentation pertains to version 1.1 of Apigee hybrid, which is no longer supported and should be upgraded.\u003c/p\u003e\n"],["\u003cp\u003eThe Apigee hybrid runtime requires a StorageClass backed by an SSD for the Cassandra database to ensure optimal performance.\u003c/p\u003e\n"],["\u003cp\u003eThe steps provided guide users on how to create a new StorageClass with an SSD backend, such as \u003ccode\u003eapigee-sc\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThese steps also illustrate how to make the newly created StorageClass the default one within the Kubernetes cluster, replacing the current default.\u003c/p\u003e\n"]]],[],null,["# StorageClass configuration\n\n| You are currently viewing version 1.1 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 AGE\n standard (default) kubernetes.io/gce-pd 98d\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 ```\n ---\n kind: StorageClass\n apiVersion: storage.k8s.io/v1\n metadata:\n name: \"apigee-sc\"\n provisioner: kubernetes.io/gce-pd\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 AGE\n apigee-sc (default) kubernetes.io/gce-pd 1d\n standard kubernetes.io/gce-pd 98d"]]