Increase the storage capacity of each MinIO node's data volume.
kubectl v1.21+ installed and configured with cluster accesshelm install minio kubeblocks/minio --version 1.1.0-alpha.0 -n kb-system
demo):
kubectl create ns demo
Volume expansion requires the StorageClass to support allowVolumeExpansion: true. The new storage size must be larger than the current size; shrinking is not supported.
Expand the data volume from 20Gi to 30Gi:
kubectl apply -f - <<EOF
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: minio-volume-expand
namespace: demo
spec:
clusterName: minio-cluster
type: VolumeExpansion
volumeExpansion:
- componentName: minio
volumeClaimTemplates:
- name: data
storage: "30Gi"
EOF
Monitor progress:
kubectl get opsrequest minio-volume-expand -n demo -w
NAME TYPE CLUSTER STATUS PROGRESS AGE
minio-volume-expand VolumeExpansion minio-cluster Succeed 2/2 71s
Verify the PVC sizes have been updated:
kubectl get pvc -n demo -l app.kubernetes.io/instance=minio-cluster
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-minio-cluster-minio-0 Bound pvc-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 30Gi RWO kb-default-sc 10m
data-minio-cluster-minio-1 Bound pvc-yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy 30Gi RWO kb-default-sc 10m
kubectl delete opsrequest minio-volume-expand -n demo --ignore-not-found