Around the Storage Block
cancel
Showing results for 
Search instead for 
Did you mean: 

HPE Primary Storage + vSphere CNS + vVols = better together

Containers and Kubernetes have started to be adopted widely. With more applications being containerized and developers leveraging Kubernetes to design their applications, persistent volume has become much more critical within the Kubernetes ecosystem. Keeping that in mind HPE released its own Container Storage Interface (CSI). CSI is an industry standard (CNCF) that will enable storage providers (SP) to develop a plugin once and have it work across several container orchestration (CO) systems. The architecture of the CSI driver allows block storage vendors to implement a CSP that follows the specification. The HPE CSI Driver for Kubernetes uses a Container Storage Provider (CSP) to perform data management operations on storage resources. At the time of writing this blog, HPE Nimble Storage, HPE Primera and HPE 3PAR all had a CSP that is compliant with the HPE CSI driver. More information can be found at http://scod.hpedev.io/

VMware has jumped on the Kubernetes bandwagon as well. Over the past few month, VMware has released multiple articles regarding their new feature: Cloud Native Storage (CNS) for vSphere. This new feature, starting with vSphere 6.7 U3, makes Kubernetes aware of how to provision storage on vSphere in a fully automated manner. More importantly, it provides full visibility within vCenter through the new CNS view.

cns1.png

One of the really cool features of CNS is that it fully supports Storage Policy-Based Management (SPBM) to provision volumes. SPBM is a feature of VMware vSphere that allows an administrator to match VM workload requirements against storage array capabilities, with the help of VM Storage profiles. This storage profile can have multiple array capabilities and data services, depending on the underlying storage you use.

It is well known in the industry that HPE Primary Storage has a strong vVols adoption in the market, mainly because it is simple to deploy and easy to use. In this blog, we are going to walk through how we can best leverage HPE Nimble Storage vVols integration and SPBM capabilities alongside CNS.

Let’s start at the beginning

First thing to do is create a vVols datastore, which can be done using our vCenter plugin. From the plugin, click ‘+’ and it provides various information to create your vVols datastore.

cns2.png

Once your vVols datastore is created, you can create a VM Storage Policy.

cns3.png

From vCenter, click Menu and select Policies and Profiles.

cns4.png

Click on VM Storage Policies, and then click on Create VM Storage Policy.

cns5.png

You can create multiple VM Storage Policies, depending on your requirement. In my lab, I have created 2 VM Storage Policies, one for my Kubernetes nodes named Nimble-vvol, and one for my containerized apps named Nimble-vvol-k8s. The reason why I have named them in that way is because the requirement of my Kubernetes nodes differ from my containerized apps. In fact, you can have multiple VM Storage Policies depending on the needs of your apps!

Below is a screenshot of my VM Storage Policy for my Kubernetes nodes.

cns6.png

As you can see, I only put a QoS rule in place as I wanted to make sure my Kubernetes cluster does not impact my other VMs.

Once you have a VM Storage policy, you can create your VMs for your Kubernetes cluster. In my case I have created 4 VMs, 1 for master and 3 for workers. During VM creation, make sure that you select this VMware storage policy while placing the k8s cluster VMs on a datastore.

cns7.png

Once you have created your VMs, you should see something similar to this under HPE Nimble Storage vCenter plugin:

cns8.png

Next: Install an OS and Kubernetes

Now, it’s time to install an OS and Kubernetes. I personally use this VMware documentation to select the OS to install and how to set up Kubernetes

Once you have Kubernetes up and running, check the state of it by running this Command Line Interface (CLI command).

cns9.png

With Kubernetes installed, you can now deploy the VMware CSI driver. Again, you can use the same documentation and start at section “Install the vSphere Cloud Provider Interface”. Once you have your VMware CSI driver installed, you can create a VM storage profile that will used by your containerized application or, or you can use an existing profile. In my case I have created a new profile called Nimble-vvol-k8s. The name will be used later when you create your storage class.

Creating a Storage Class that refers to your new VM Storage Policies

Now, let’s create a storage class that refers to the VM Storage Policies you just created.

cns10.png

Field “storagepolicyname” maps to the name of the VM Storage Policies you just created, so adjust your storage class accordingly, and create your policy using kubectl.

At this point, you just need to create a pod that uses this storage class. You can use the full example available here to deploy a new mongodb services. That’s exactly what I did in my lab.

cns11.png

Once you have it deployed, you can check the CNS UI within vCenter, you see volumes used by your containers.

cns12.png

If you click on detail, you will see various information on that particular volume.

cns13.png

When you check on the Nimble array GUI under the “folder” that corresponds to your vVols datastore, you should see something similar to this:

cns14.png

You can see that you have multiple vVols, and each to them belongs to a particular container.

To the question, “Does HPE Primary Storage support vSphere CNS?” The answer is a big “YES”!

HPE Nimble Storage vVols integration is a key component of this solution, as it offers full flexibility, and granularity that may be required by your containerized application. You can define multiple VM storage profiles which can be assigned to a different storage class within Kubernetes to really fit your needs!

Until next time -- I hope that everyone stays safe and healthy!  

Fred

Fred Gagne, Technical Marketing Engineer

About the Author

Fred_Gagne

Fred specializes in HPE Converged Solution and HPE Nimble Storage dHCI solution.