Member-only story

Kubernetes Storage — Dynamic Volume Provisioning

Arun Kumar Singh
3 min readAug 31, 2020

--

In Kubernetes, Dynamic volume provisioning is a mechanism which allows storage volumes to be created on-demand. Kubernetes Cluster uses concept of Storage class to achieve the same. Storage class another type of object in Kubernetes which allows you to abstract the details of underlying storage in a simple fashion. Kubernetes uses a system of persistent volume claim (PVC) and persistent volume (PV) to simplify storage operations with help of Storage Class (SC).

A cluster administrator can define as many StorageClass objects as needed, each specifying a volume plugin ( provisioner) that provisions a volume and the set of parameters to pass to that provisioner when provisioning.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fastdisk
provisioner: kubernetes.io/azure-disk
reclaimPolicy: Delete
volumeBindingMode: Immediate
parameters:
storageaccounttype: Premium_LRS
kind: Managed
#You can make any StorageClass as default, by adding the #storageclass.kubernetes.io/is-default-class annotation to it.

To access the Storage you must create the object PVC (PersistentVolumeClaim). PVC is the request to provision persistent storage with a specific type and configuration. PVC uses Storage class to create specific request to provisioner for storage creation. That’s it once PVC is in the system, rest of the things will be taken care by k8s cluster. ex: storage creation in cloud, PV creation and management etc.

--

--

Arun Kumar Singh
Arun Kumar Singh

Written by Arun Kumar Singh

In quest of understanding How Systems Work !

No responses yet