B Increasing Persistent Volume Claim (PVC)

Increasing the PVC size to support scalability is a mandatory task and must be performed only after the Helm installation or upgrade is complete.

Note:

The PVC size increment must not be performed during the Helm installation or upgrade.
Perform the following steps to increase the PVC:
  1. Set the ALLOWVOLUMEEXPANSION to True for the Storageclass. The default value is standard.
    Increasing PVC

  2. Run the following command to scale down the statefulset for the namespace.
    kubectl scale sts provgw-auditor-service --replicas=0 -n <namespace>
    When the statefulset is scaled down, the pod will go to terminate state.
  3. Run the following command to edit the PVC.
    kubectl edit pvc dynamic-auditor-pvc-provgw-auditor-service-0 -n <namespace >
    You can change the storage space to the required value and save the details.
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi
      storageClassName: standard
      volumeMode: Filesystem
      volumeName: pvc-87978b35-2320-4da5-9ca0-1dae183d29e7
    status:
      accessModes:
      - ReadWriteOnce
      capacity:
        storage: 10Gi
      phase: Bound
  4. Run the following command to scale-up the statefulset.
    kubectl scale sts provgw-auditor-service --replicas=1 -n <namespace>
  5. Run the following command to view the increased storage in the pod.
    kubectl get pvc -n <namespace>