Hedvig introduces dynamic volume provisioner for Kubernetes
The container ecosystem is briskly evolving to support production-ready workloads. To achieve that goal running highly available stateful containers is required. Dynamic and instantaneous provisioning of resources is the core element of any containerized infrastructure, and Kubernetes’ dynamic volume provisioning feature makes storage consumption inside containers quick and seamless.
Kubernetes’ dynamic volume provisioning allows storage volumes to be created on-demand. Before dynamic provisioning, cluster administrators had to manually make calls to their storage provider to provision new storage volumes, and then create Persistent Volume (PV) objects to represent them in Kubernetes. With dynamic provisioning, these two steps are automated, eliminating the need for cluster administrators to pre-provision storage. Instead, storage resources can be dynamically provisioned using the provisioner specified by the StorageClass object.
Static volume provisioner
In Kubernetes, a Pod is an abstraction to group multiple containers needed for an application to start. Persistent Volume (PV) corresponds to networked storage and is used as a resource in the cluster. To request storage for Pods, and in turn containers, Persistent Volume Claim (PVC) can either statically or dynamically consume a PV resource based on storage size and access mode. StorageClasses use provisioners that are specific to the storage platform provider to give Kubernetes access to the physical media being used. For dynamic volume provisioning, PVC informs Kubernetes which storage class to talk to, in order to create PVs using a specific backend storage.
Hedvig has developed its own provisioner, which integrates with Kubernetes and provides a solution to create PVs dynamically with Hedvig as an external storage. Hedvig’s Provisioner is essentially a gateway for Kubernetes to talk to Hedvig. All you need to do is install the Hedvig Provisioner on any node with Kubectl installed in the Kubernetes cluster. After installation, you can use it by mentioning it in a storage class template, which will then be consumed by PVC. When a Pod requests a storage volume using the previously mentioned PVC, a PV is created dynamically meeting those requirements, and it will be provided to the Pod in real time.
Hedvig’s dynamic volume provisioner
The Hedvig Provisioner is easy to install, and when you create PVs on a Hedvig Cluster, you can select from all of the features that Hedvig provides. These features include, compression, deduplication, client-side caching, encryption, etc. With Hedvig, you can deploy a hybrid-cloud and multi-cloud infrastructure for containers by utilizing Hedvig’s flexible and scalable storage cluster that can stretch across any combination of on-premise datacenters and public clouds.
SPECIFYING HEDVIG PROVISIONER IN STORAGECLASS
The following manifest creates a Storage Class for PVs backed by Hedvig virtual disks of type Block:
Note: The backendType should exactly match the storage driver name mentioned during the installation of the Hedvig Provisioner.
CUSTOMIZING STORAGE CLASSES WITH HEDVIG VIRTUAL DISK ATTRIBUTES
Storage Classes can be customized by specifying Hedvig virtual disk attributes in the parameters section:
HEDVIG VIRTUAL DISK ATTRIBUTE KEYS
You can select from the following of Hedvig’s optional virtual disk attributes:
- dedupEnable – true/false (default: false)
- compressed – true/false (default: false)
- cacheEnable – true/false (default: false)
- rf (Replication Factor) – 1 to 6 (default: 3)
- rp (Replication Policy) – Agnostic/RackAware/DataCenterAware
- dcNames (Data Center Names) – comma-separated list of data center names
- Applies only when you select rp (Replication Policy) as ‘DataCenterAware’
- diskResidence – flash/hdd (default: hdd)
- encryptionEnable – true/false (default: false)
- blockSize – 512/4096 (default: 4096 for block disk)
- description – any string
Please take a look at our Tech Field Day presentation for a demo of Hedvig’s Kubernetes integration here.