Expand volume
You can expand the storage volume size of each pod.
Before you start
Check whether the cluster status is Running
. Otherwise, the following operations may fail.
kbcli cluster list mycluster
>
NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME
mycluster default mysql mysql-8.0.33 Delete Running Jul 05,2024 18:46 UTC+0800
Steps
Change configuration.
Configure the values of
--components
,--volume-claim-templates
, and--storage
, and run the command below to expand the volume.kbcli cluster volume-expand mycluster --components="mysql" \
--volume-claim-templates="data" --storage="2Gi"--components
describes the component name for volume expansion.--volume-claim-templates
describes the VolumeClaimTemplate names in components.--storage
describes the volume storage size.
Validate the volume expansion operation.
kbcli cluster list mycluster
>
NAME NAMESPACE CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS CREATED-TIME
mycluster default mysql mysql-8.0.33 Delete Running Jul 05,2024 18:46 UTC+0800- STATUS=Updating: it means the volume expansion is in progress.
- STATUS=Running: it means the volume expansion operation has been applied.
Check whether the corresponding resources change.
kbcli cluster describe mycluster