KubeBlocks
BlogsEnterprise
⌘K
​
Blogs

Overview
Quickstart
Architecture

Operations

Lifecycle Management
Vertical Scaling
Horizontal Scaling
Volume Expansion
Switchover
Minor Version Upgrade
Manage Services

Backup & Restore

Backup
Restore

Observability

Observability for etcd Clusters
  1. Prerequisites
  2. Check Current Storage
  3. Apply Volume Expansion
  4. Verify Expansion
  5. Cleanup

Volume Expansion for etcd Clusters with KubeBlocks

This guide explains how to expand the storage volume of an etcd cluster managed by KubeBlocks.

NOTE

Volume expansion requires that the underlying StorageClass supports volume expansion (allowVolumeExpansion: true). You can only increase volume size, not decrease it.

Prerequisites

    Before proceeding, verify your environment meets these requirements:

    • A functional Kubernetes cluster (v1.21+ recommended)
    • kubectl v1.21+ installed and configured with cluster access
    • Helm installed (installation guide)
    • KubeBlocks installed (installation guide)
    • etcd Add-on installed and an etcd cluster running (see Quickstart)

    Check Current Storage

    kubectl get pvc -n demo -l app.kubernetes.io/instance=etcd-cluster
    Example Output
    NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE data-etcd-cluster-etcd-0 Bound pvc-xxx 20Gi RWO kb-default-sc 10m data-etcd-cluster-etcd-1 Bound pvc-xxx 20Gi RWO kb-default-sc 10m data-etcd-cluster-etcd-2 Bound pvc-xxx 20Gi RWO kb-default-sc 10m

    Apply Volume Expansion

    Expand the data volume from 20Gi to 30Gi:

    apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: etcd-volumeexpansion namespace: demo spec: clusterName: etcd-cluster type: VolumeExpansion volumeExpansion: - componentName: etcd volumeClaimTemplates: - name: data storage: 30Gi

    Apply it:

    kubectl apply -f https://raw.githubusercontent.com/apecloud/kubeblocks-addons/refs/heads/main/examples/etcd/volumeexpand.yaml

    Monitor the progress:

    kubectl get ops etcd-volumeexpansion -n demo -w
    Example Output
    NAME TYPE CLUSTER STATUS PROGRESS AGE etcd-volumeexpansion VolumeExpansion etcd-cluster Running 0/3 10s etcd-volumeexpansion VolumeExpansion etcd-cluster Running 1/3 20s etcd-volumeexpansion VolumeExpansion etcd-cluster Running 2/3 33s etcd-volumeexpansion VolumeExpansion etcd-cluster Running 3/3 45s etcd-volumeexpansion VolumeExpansion etcd-cluster Succeed 3/3 47s

    Update the storage request in the Cluster spec:

    kubectl patch cluster etcd-cluster -n demo --type=json \ -p='[{"op": "replace", "path": "/spec/componentSpecs/0/volumeClaimTemplates/0/spec/resources/requests/storage", "value": "30Gi"}]'

    Monitor the cluster status:

    kubectl get cluster etcd-cluster -n demo -w

    Verify Expansion

    kubectl get pvc -n demo -l app.kubernetes.io/instance=etcd-cluster
    Example Output
    NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE data-etcd-cluster-etcd-0 Bound pvc-xxx 30Gi RWO kb-default-sc 12m data-etcd-cluster-etcd-1 Bound pvc-xxx 30Gi RWO kb-default-sc 12m data-etcd-cluster-etcd-2 Bound pvc-xxx 30Gi RWO kb-default-sc 12m

    Cleanup

    kubectl delete cluster etcd-cluster -n demo kubectl delete ns demo

    © 2026 KUBEBLOCKS INC