Azure PVC resizing
1 min readApr 25, 2020
When you required to resize volume in Azure only that you need is edit the storage class and add this parameter allowVolumeExpansion: true, works for Azure Files, and Azure Disk. For example:
$ kubectl edit storageclass managed-premiumkind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: managed-premium
provisioner: kubernetes.io/azure-disk
parameters:
skuname: Standard_LRS
kind: Managed
cachingmode: None
allowVolumeExpansion: true#save change
After this, you can edit the size for your pvc, example:
$ kubectl edit pvc my-pvcapiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test
spec:
accessModes:
- ReadWriteMany
storageClassName: managed-premium
resources:
requests:
storage: 2Gi ----> here change the size
# save change
And that's all.
I hope that I have helped.
Cheers!