[GlusterFS Dynamic Provisioner] Online Resizing of GlusterFS PVs in kubernetes v>= 1.8 !!!

While the kubernetes storage-sig keeps adding new features in each and every release, we also listen to our user feedback to improve the existing storage interfaces in solving the existing limitations.

Previously,the admin had to do proper capacity planning in order to use persistent Volumes as the microservices or the application pods wanted to save its data for persistence. But,if the initial sizing was wrong, then applications will easily fill this storage and run out of space which would then demand a complete reprovisioning. This is definitely not a desirable situations to be in.

One of the most sought after feature therefore was to add dynamic resizing of the volumes in Kubernetes.

Kubernetes 1.8 release now provides this very functionality. It provides the functionality to resize GlusterFS volume type/plugin.

Now that the feature introduction has been done, let’s now see how this can be achieved with an example below:

As PV resize is in alpha, we need to enable ExpandPersistentVolumes feature gate and also PersistentVolumeClaimResize admission plugin.

Once its enabled,

Let’s create a GlusterFS PV. As a prerequisite, create a secret for heketi authenticaion if heketi auth is enabled in heketi server.

Then create a storageclass :

Now we proceed to create a PVC:

Check the status of PVC :

So the claim is created and its size is “8Gi” at the moment.

Create a pod and attach this claim to the pod and verify the size of the volume from the pod.

Suppose we now want to increase the size of this PVC to 10Gi from 8Gi, we can do that by editing the PVC object ie
Edit the storage field value to the desired size , for example , let’s make the field of storage to 10Gi and save.

Have a watch on the PVC, without much delay we can see that the new size is reflected under PVC output

Let’s get into the pod which is using this claim and check for the size of the mount point, we can see the new size has reflected in the pod and the application can now make use of the new size.

Demo :

This was a must have requirement in a cloud infrastructure and GlusterFS leads the way to support this for them.

PS: This feature is only enabled for GlusterFS in Kubernetes 1.8,future versions of kube will bring this capability to more plugins.

Digiprove sealCopyright secured by Digiprove © 2018 Humble Chirammal
Spread the love
  • 2

Leave a Reply

Your email address will not be published. Required fields are marked *