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.
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.
Processo
Antes de prosseguir com a expansão do volume permanente, verifique se "allowVolumeExpansion: true"
está definido no StorageClass quando ele é criado:
kubectl get sc standard -o json | jq .allowVolumeExpansion true
Atualize o tamanho do volume para a configuração de volume permanente (PVC) atual:
Atualize o arquivo overrides.yaml e aplique as alterações:
cassandra:storage:capacity:20Gi
./apigeectl apply -c cassandra -f overrides.yaml
Reinicialização contínua dos pods do Cassandra para refletir o novo tamanho Exclua os pods do Cassandra de cada
vez. Verifique se o statefulset está íntegro antes de continuar para os próximos nós:
kubectl -n apigee delete pod apigee-cassandra-2
kubectl -n apigee get sts
NAME READY AGE
apigee-cassandra 3/3 64s
Verifique se os pods do Cassandra estão criando o novo tamanho de volume:
[[["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\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 ```"]]