Around the Storage Block
StorageExperts

Introducing HPE SimpliVity CSI plugin for Kubernetes

HPE SimpliVity hyperconverged infrastructure has long been appreciated for its enterprise-class features in a simple, VM-centric platform. Now the same great features and simplicity are available in Kubernetes environments. A new HPE SimpliVity plugin lets you create persistent volumes for containerized applications while providing HPE SimpliVity backup and restore operations for data protection.

Using containers in HPE SimpliVity environments

Containers offer a logical packaging mechanism in which applications can be abstracted from the environment in which they actually run. Containerization provides a clean separation of concerns, as developers focus on their application logic and dependencies, while IT operations teams can focus on deployment and management without bothering with application details such as specific software versions and configurations specific to the app.

HPE-SimpliVity-CSI-plugin-blog.pngBecause containers are portable, efficient, scalable, and reliable, these have gained lot of attention recently, and the demand for storage for the containerized applications has also increased. Now, thanks to a new Container Storage Interface (CSI) plugin, you can use containers with HPE SimpliVity hyperconverged infrastructure (HCI), creating and using the persistent storage on the same datastore used by your virtual machines.

What is CSI?

CSI is a standard for exposing storage systems in arbitrary block and file storage to containerized workloads on Container Orchestrations like Kubernetes. Third-party storage providers can expose their new storage systems using CSI, without actually touching the Kubernetes code. A storage provider can perform single independent implementation of CSI Driver on any orchestrator.

Why develop a CSI plugin?

Prior to CSI, k8s volume plugins had to be “in-tree,” compiled and shipped with core Kubernetes binaries. In-tree plugins require storage providers to check in, verifying they're into the core k8s codebase, if they wish to add support for a new storage system.

A plugin-based solution, Kubernetes FlexVolume, tried to address this issue by exposing the exec-based API for external plugins. Although it works on a similar notion of being detached from the k8s binary, there are major issues with that approach. First, it needs root access to the host and primary file system to deploy the driver files. Secondly, it comes with a huge number of prerequisites and OS dependencies which are assumed to be available on the host.

CSI implicitly solves all these issues by being containerized and using the k8s storage primitives.

The CSI specification has evolved at a rapid pace since its inception nearly three years ago, steadily adding new features and capabilities. The Kubernetes community declared CSI stable and made it generally available in Kubernetes 1.13 which was released earlier this year. CSI improves the quality of life for both Dev and Ops staff. Developers get a very consistent interface that allows them to consume storage resources. The Ops person benefits from a very consistent deployment model, as CSI drivers and relevant sidecar containers are simply Kubernetes workloads.

How to implement the new HPE SimpliVity plugin

The new HPE SimpliVity CSI 1.0.0 plugin caters to the need of creating persistent volumes dynamically for containerized applications on HPE SimpliVity datastores, and performs operations like backup and restore.

The HPE SimpliVity CSI driver for vSphere enables you to provision HPE SimpliVity storage for Kubernetes applications while providing HPE SimpliVity data protection.

Figure 1: Kubernetes cluster with the HPE SimpliVity CSI driver deployed.Figure 1: Kubernetes cluster with the HPE SimpliVity CSI driver deployed.

 

Kubernetes cluster: The set of Kubernetes nodes used to run containerized applications on an HPE SimpliVity host.

HPE SimpliVity Container Storage Interface (CSI) driver: The HPE SimpliVity software component that is responsible for provisioning persistent volumes from an existing HPE SimpliVity datastore.

vCenter Server CNS driver: A vCenter Server component that enables provisioning and life cycle operations for container volumes on vSphere. The HPE SimpliVity CSI plugin uses the CNS driver to create and delete persistent volumes.

First Class Disk (FCD): An FCD is a volume that is independent of a virtual machine in VMware. The HPE SimpliVity CSI Driver uses FCDs to manage data volumes separate from Kubernetes nodes.

HPE SimpliVity host: An x86 server running HPE SimpliVity software and VMware ESXi. To use the HPE SimpliVity CSI plugin, the HPE SimpliVity host must be running VMware ESXi 6.7U3.

HPE SimpliVity datastore: HPE SimpliVity datastores provide storage resources to the VMware ESXi host over the NFS protocol. A Kubernetes storage class maps persistent volume requests to an HPE SimpliVity datastore. Persistent volumes inherit the backup policy of the datastore where they are created.

REST API: The HPE SimpliVity CSI plugin uses an internal REST API to create and restore persistent volume snapshots in an HPE SimpliVity datastore.

CLI: The HPE SimpliVity CLI has been enhanced to support persistent volumes.

Prerequisites for plugin installation

The following are the prerequisites to use this plugin:

  • HPE SimpliVity 4.1.0
  • VMWare vSphere 6.7U3
  • Kubernetes 1.17 & 1.18
  • VMware vSphere CPI driver 1.1.0
  • CSI Snapshot Controller 2.1.1

Installation

Installation of this plugin is simple using the Kubectl tool. Start by creating a Kubernetes Secret containing the HPE SimpliVity host and vCenter information. Next, create RBAC for Cluster Role. HPE SimpliVity CSI components consist of a deployment, a DaemonSet and a CSI Driver. All the above components are provided as YAML files and can be found on GitHub.

Verification

To verify HPE SimpliVity CSI driver installation, use the Kubectl tool to list the components created. Make sure the svt-csi-controller and svt-csi-node are listed.

Figure 2: List of HPE SimpliVity CSI componentsFigure 2: List of HPE SimpliVity CSI components

 

Uninstalling the plugin

All the components listed above can be uninstalled very simply using the “kubectl remove” command.

What can be done using HPE SimpliVity CSI Plugin?

The new plugin lets you perform static and dynamic provisioning, create volume snapshots, and perform a number of other HPE SimpliVity operations.

Static and dynamic provisioning

After the CSI plugin is installed successfully on the Kubernetes cluster, it will be available to use with persistent volumes (PV), persistent volume claims (PVC) and volume snapshots.

Storage class is the main component of dynamic provisioning, and you can create a storage class which points to an HPE SimpliVity datastore. When this storage class is specified in any PVC or configuration file of any containerized application, it triggers dynamic provisioning. The creation of the PVC will then initiate the creation of a PV on the HPE SimpliVity datastore through CSI.

Static provisioning can be done by using the existing volume on the datastore.

Persistent volume snapshots

Volume snapshot is a copy of a persistent volume’s content at a particular point of time. HPE SimpliVity CSI plugin supports the creation, restoration, and deletion of volume snapshots.

Access mode

The new CSI plugin supports “ReadWriteOnce” access mode on the volumes created, which means no other pods can use or mount this persistent volume or multiple pods cannot use the single persistent volume simultaneously.

HPE SimpliVity operations

Along with the Kubernetes operations, this CSI plugin also allows HPE SimpliVity operations to be performed such as backup, restore and setting backup policies on persistent volumes.

CLI and REST API support

New HPE SimpliVity CLI commands and REST APIs are introduced to support the operations on persistent volumes.

vSphere UI support

Persistent Volumes created by this plugin can be viewed on vSphere Web Client under the following path:

vSphere Web Client > Storage > Monitor > Cloud Native Storage > Container Volumes

Details like the volume name, capacity, labels, volume ID, worker node, etc., can be viewed.

Figure 3: Persistent Volumes on vSphere Web Client UI.Figure 3: Persistent Volumes on vSphere Web Client UI.

 

HPE SimpliVity CLI commands for persistent volumes

By default, all the persistent volumes created under a datastore will inherit the HPE SimpliVity backup policy assigned to the datastore and backups are taken accordingly. By using the new HPE SimpliVity CLI commands a backup can be created, restored, deleted, and a backup policy can be set.

The following are new HPE SimpliVity CLI commands related to PV:

  • svt-pv-backup: Creates a manual backup of a persistent volume.
  • svt-pv-policy-set: Sets a backup policy for persistent volume.
  • svt-pv-show: Displays details about persistent volumes.

Backups can be viewed on vSphere web client in the location shown below.

Figure 4: HPE SimpliVity Backups view of the persistent volume backups.Figure 4: HPE SimpliVity Backups view of the persistent volume backups.

Supported container platforms

This plugin has been tested on the following platforms:

Watch for new versions of this CSI plugin to be released as newer versions of Kubernetes and VMWare vSphere come out.

References

HPE SimpliVity CSI driver images:

  • docker.io/hpesimplivity/vsphere-csi-driver:v1.0.0
  • docker.io/hpesimplivity/vsphere-csi-syncer:v1.0.0

Anusha-Y.jpegMeet HPE blogger Anusha Y.  Anusha is part of the HPE SimpliVity Solutions team supporting the design and implementation of solutions and technical marketing of the product. She drives the development of solutions based on observations from field engineers and direct customer input.

Connect with Anusha on LinkedIn.

 

 

 

Storage Experts
Hewlett Packard Enterprise

twitter.com/HPE_Storage
linkedin.com/showcase/hpestorage/
hpe.com/simplivity

 

0 Kudos
About the Author

StorageExperts

Our team of Hewlett Packard Enterprise storage experts helps you to dive deep into relevant infrastructure topics.