Esse processo permite expandir os volumes permanentes usados pelo banco de dados híbrido do Cassandra da Apigee para acomodar maiores necessidades de armazenamento sem precisar criar novos nós apenas para fornecer mais armazenamento.
Visão geral
O componente cassandra híbrido da Apigee usa volumes permanentes para armazenar dados. O tamanho do volume permanente é definido durante a instalação e a configuração inicial. Esse tamanho de armazenamento inicial é um valor imutável e não pode ser alterado. Portanto, qualquer novo nó adicionado ao cluster usará o mesmo tamanho de volume permanente.
É possível aumentar o tamanho do volume permanente existente fazendo alterações diretamente na reivindicação de volume permanente, mas novos nós ainda usarão o tamanho de volume permanente inicial menor.
Se seu banco de dados híbrido do Cassandra estiver próximo à capacidade de armazenamento, use este procedimento para expandir os volumes permanentes existentes e permitir que novos nós também expandam os respectivos volumes permanentes.
Expandir volumes permanentes do Cassandra
Atualize o tamanho do volume para o tamanho desejado:
kubectl -n apigee edit pvc
Verifique a capacidade de volume atualizada:
kubectl get pvc -n apigee
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
cassandra-data-apigee-cassandra-default-0 Bound pvc-92234ba7-941b-4dab-82c6-8a5288a2c8d4 100Gi RWO standard 21m
cassandra-data-apigee-cassandra-default-1 Bound pvc-6be911fc-91f7-465d-a02e-933428ee10b2 100Gi RWO standard 20m
cassandra-data-apigee-cassandra-default-2 Bound pvc-14ba34e4-fd5c-4d59-8413-a331dcad3404 100Gi RWO standard 19m
Defina réplicas como 0 para implantações apigee-controller-manager no namespace apigee-system:
kubectl get deployments -n apigee-system
NAME READY UP-TO-DATE AVAILABLE AGE
apigee-controller-manager 1/1 1 1 28m
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 UTC."],[[["\u003cp\u003eThis documentation outlines the process for expanding the persistent volumes used by the Apigee hybrid Cassandra database to accommodate increased storage needs.\u003c/p\u003e\n"],["\u003cp\u003eWhile the initial storage size for the Cassandra persistent volume is immutable, you can expand the existing persistent volume's size by directly modifying the Persistent Volume Claim.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves updating the volume size in the Persistent Volume Claim, setting the \u003ccode\u003eapigee-controller-manager\u003c/code\u003e replicas to \u003ccode\u003e0\u003c/code\u003e, deleting the STS without cascade, updating the overrides file, and reapplying the configuration.\u003c/p\u003e\n"],["\u003cp\u003eThis procedure is only applicable to Kubernetes storage classes that support Persistent Volume expansion, as indicated by the Allow Volume Expansion list in the Kubernetes documentation.\u003c/p\u003e\n"],["\u003cp\u003eAfter completing the steps in the procedure, new nodes in the cluster will be able to expand their volumes to match the new persistent volume size and the existing pods will have their storage increased.\u003c/p\u003e\n"]]],[],null,["# Expand Cassandra persistent volumes\n\n| You are currently viewing version 1.3 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\nOverview\n--------\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| **Note:** This process only applies to Kubernetes storage classes that support PersistentVolume expansion. See the **[Allow\n| Volume Expansion list](https://kubernetes.io/docs/concepts/storage/storage-classes/#allow-volume-expansion)** in the Kubernetes documentation.\n|\n|\n| If you do not know what storage class your hybrid installation uses, you can check with\n| the following command. \n|\n| ```\n| kubectl -n apigee get sc standard -o json | grep 'provisioner'\n| ```\n|\n|\n| The output will look something like: \n|\n| ```\n| \"provisioner\": \"kubernetes.io/gce-pd\",\n| ```\n|\n|\n| Where `gce-pd` is an abbreviation for the *gcePersistentDisk* storage class.\n| You can find a list of storage class abbreviations in the **[Parameters\n| list](https://kubernetes.io/docs/concepts/storage/storage-classes/#parameters)** in the Kubernetes documentation.\n\nExpand Cassandra persistent volumes\n-----------------------------------\n\n1. Update the volume size to the desired size: \n\n ```\n kubectl -n apigee edit pvc\n ```\n2. Check the updated volume capacity: \n\n ```\n kubectl get pvc -n apigee\n ``` \n\n ```\n NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE\n cassandra-data-apigee-cassandra-default-0 Bound pvc-92234ba7-941b-4dab-82c6-8a5288a2c8d4 100Gi RWO standard 21m\n cassandra-data-apigee-cassandra-default-1 Bound pvc-6be911fc-91f7-465d-a02e-933428ee10b2 100Gi RWO standard 20m\n cassandra-data-apigee-cassandra-default-2 Bound pvc-14ba34e4-fd5c-4d59-8413-a331dcad3404 100Gi RWO standard 19m\n ```\n3. Set replicas to `0` for `apigee-controller-manager` deployments in the `apigee-system` namespace:\n 1.\n\n ```\n kubectl get deployments -n apigee-system\n ``` \n\n ```text\n NAME READY UP-TO-DATE AVAILABLE AGE\n apigee-controller-manager 1/1 1 1 28m\n ```\n 2.\n\n ```\n kubectl edit deployments -n apigee-system apigee-controller-manager\n ```\n 3.\n\n ```\n kubectl get deployments -n apigee-system\n ``` \n\n ```\n NAME READY UP-TO-DATE AVAILABLE AGE\n apigee-controller-manager 0/0 0 0 30m\n ```\n4. Delete STS without cascade deletion:\n 1.\n\n ```\n kubectl -n apigee delete sts --cascade=false apigee-cassandra\n ```\n 2.\n\n ```\n kubectl get sts -n apigee\n ``` \n\n ```\n No resources found in apigee namespace.\n ```\n5. Update the your overrides file with new volume size that you specified when you edited the pvc: \n\n ```actionscript-3\n cassandra:\n storage:\n capacity: 100Gi\n ```\n6. Apply the updated configuration to the cluster: \n\n ```\n ../apigeectl apply --datastore -f overrides/overrides.yaml\n ``` \n\n ```\n Parsing file: config/values.yaml\n Parsing file: overrides/overrides.yaml\n cleansing older AD's (v1alpha1) istio resources...\n\n Invoking \"kubectl apply\" with YAML config...\n\n apigeedatastore.apigee.cloud.google.com/apigee-cassandra unchanged\n ```\n7. Update the controller deployment replicas to previous their state (```1```): \n\n ```\n kubectl edit deployments -n apigee-system apigee-controller-manager\n ```\n8. Check if the newly created sts has the updated storage size: \n\n ```\n kubectl get sts -n apigee apigee-cassandra -o yaml |grep storage\n ``` \n\n ```\n storage: 100Gi\n ```\n9.\n Check if C\\* pods data volume got updated with new size:\n\n ```\n kubectl exec -n apigee -it apigee-cassandra-default-0 -- df -h|grep \"/opt/apigee/data\"\n ``` \n\n ```\n /dev/sdb 99G 69M 99G 1% /opt/apigee/data\n ```"]]