“Retain” ( PV claim policy) GlusterFS Dynamically Provisioned Persistent Volumes in Kubernetes >=1.8

Since introduction, dynamic provisioning feature of Kube storage defaulted with reclaim policy as Delete. It was not specific to glusterfs PVs rather common for all PVs which are dynamically provisioned in kube storage.

However from kube >= v1.8, we could specify retain policy in storage class! A much needed functionality in SC for different use cases and setups!

This article describes a how to from gluster PV perspective.

Lets first create a Storage class with reclaim policy as “Retain”.

Once we have above SC configuration yaml, lets create other prerequisites for creating or provisioning glusterfs dynamic PVs. Those are nothing but a secret for restservice/heketi and a Persistent volume claim called claim11 as we do always!

Check the PV and PVC status:

Awesome, GlusterFS PV is created with reclaim policy “Retain” as you can see in above output!

Lets double confirm this from the details on PV.

Delete the PVC or claim and confirm the PV exist even after PVC is deleted!

Lets check whether we still have the PV or not.

Yes, we have it!

Digiprove sealCopyright secured by Digiprove © 2017 Humble Chirammal

Leave a Reply

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