Disk size change
This section describes how to set the volume size for RabbitMQ for volume expansion. This also applies to the first deployment of the RabbitMQ cluster.
|
The storage class must support volume expansion feature in the Kubernetes cluster. Please consult the documentation of the storage backend of your storageClass provider of your choice. |
You can check your existing storageClass for the running RabbitMQ by the
following command (Require kubectl and jq command):
kubectl get pvc/rabbitmq-rabbitmq-statefulset-0 -n <rabbitmq_namespace> -o json | jq -r '.spec.storageClassName'
Then check if this storageClass supports expansion by running the following
command:
kubectl get sc/<storageClassName>
The example output is like this:
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
local-path (default) rancher.io/local-path Delete WaitForFirstConsumer false 263d
Check the ALLOWVOLUMEEXPANSION field, if false then the storage disk type
does not support volume expansion. You must remove the RabbitMQ cluster and its
PVC, then re-create using a new volume size (this will cause data loss).
If your disk type supports the volume expansion, then you can start modifying
the custom-values-infra.yaml (See CustomValueFile) to start the process.
Add the following code outside the global block:
rabbitmq:
statefulSets:
rabbitmq:
volume:
size: 2Gi
Then apply the nexeed-infra Helm chart with the new
custom-values-infra.yaml. Please see Deployment with Helm.
|
The default size of RabbitMQ disks are 1 Gigabyte. The syntax for Kubernetes is Mi, Gi, etc. The conversion rate is: 1 Gi = 1024 Mi The disk size cannot be shrunken, only increase is allowed. |