Dynamic Persistent Volume Resizing

12/10/2020

I am using Persistent Volume Claim and default StorageClass to create a dynamic Persistent Volume. I changed the storage size from 60G to 80G in Persistent Volume Claims but the size of PVC and PV doesn't increased. It shows the 60G only.

I am using Terraform to manage Cluster and PVC.

-- Mrugesh Shah
azure-aks
kubernetes

1 Answer

12/10/2020

You need to define the below property in the storage class

allowVolumeExpansion: true

Note that the cloud provider should support the volume expansion then only it would work. Follow the link for further help https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/

-- P Ekambaram
Source: StackOverflow