Azure PVC resizing

Gloria Palma González
1 min readApr 25, 2020

--

@ZatoryPrivate

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!

--

--

Gloria Palma González
Gloria Palma González

Written by Gloria Palma González

My life is a paradigm: I can do anything. IT engineer, melomaniac, in love: #Infrastructure #OpenSource #CommunityLeadershipTeams #SoftwareEngineering

No responses yet