github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/docs/user_docs/kubeblocks-for-pulsar/cluster-management/expand-volume.md (about)

     1  ---
     2  title: Expand volume
     3  description: How to expand the volume of a Pulsar cluster
     4  sidebar_position: 3
     5  sidebar_label: Expand volume
     6  ---
     7  
     8  # Expand volume
     9  
    10  You can expand the storage volume size of each pod.
    11  
    12  ## Before you start
    13  
    14  Check whether the cluster status is `Running`. Otherwise, the following operations may fail.
    15  
    16  ```bash
    17  kbcli cluster list pulsar
    18  ```
    19  
    20  ## Steps
    21  
    22  1. Change configuration. There are 3 ways to apply volume expansion.
    23  
    24      **Option 1.** (**Recommended**) Use kbcli
    25  
    26      Configure the values of `--components`, `--volume-claim-templates`, and `--storage`, and run the command below to expand the volume.
    27  
    28      :::note
    29  
    30      Expand volume for `journal` first. `Ledger` volume expansion must be performed after the `journal` volume expansion.
    31  
    32      :::
    33  
    34     - Expand volume for `journal`.
    35  
    36       ```bash
    37       kbcli cluster volume-expand pulsar --storage=40Gi --components=bookies -t journal  
    38       ```
    39  
    40       - `--components` describes the component name for volume expansion.
    41       - `--volume-claim-templates` describes the VolumeClaimTemplate names in components.
    42       - `--storage` describes the volume storage size.
    43  
    44     - Expand volume for `ledger`.
    45  
    46       ```bash
    47       kbcli cluster volume-expand pulsar --storage=200Gi --components=bookies -t ledgers  
    48       ```
    49  
    50      **Option 2.** Create an OpsRequest
    51  
    52      Change the value of storage according to your need and run the command below to expand the volume of a cluster.
    53  
    54      ```bash
    55      kubectl apply -f - <<EOF
    56      apiVersion: apps.kubeblocks.io/v1alpha1
    57      kind: OpsRequest
    58      metadata:
    59        generateName: pulsar-volume-expand-
    60      spec:
    61        clusterRef: pulsar
    62        type: VolumeExpansion
    63        volumeExpansion:
    64        - componentName: bookies
    65          volumeClaimTemplates:
    66          - name: ledgers
    67            storage: "200Gi"
    68          - name: journal
    69            storage: "40Gi"      
    70      EOF
    71      ```
    72  
    73      **Option 3.** Edit cluster with `kubectl`.
    74  
    75      ```bash
    76      kubectl edit cluster pulsar
    77      ```
    78  
    79  2. Validate the volume expansion operation.
    80  
    81     ```bash
    82     kubectl get ops  
    83     ```
    84  
    85     * STATUS=VolumeExpanding: it means the volume expansion is in progress.
    86     * STATUS=Running: it means the volume expansion operation has been applied.
    87  
    88  3. Check whether the corresponding resources change.
    89  
    90      ```bash
    91      kbcli cluster describe pulsar
    92      ```