Kubernetes persistent volumes are used to provide containers with durable storage without application developers needing to concern themselves about the underlying implementation details. Kubernetes storage creates a useful abstraction that is able to support an extensible set of different storage provisioners, such as Amazon EBS, Azure Managed Disks, or Google Cloud Persistent Disk.
But Kubernetes users can gain many more data management features for that persistent storage by using BlueXP Cloud Volumes ONTAP or FSx for ONTAP as the back-end storage service.
In this article, we will demonstrate how to use NetApp BlueXP console to leverage Cloud Volumes ONTAP and NetApp Astra Trident to dynamically provision persistent storage for your Kubernetes clusters.
Read on or use the links below to jump down to the sections on:
Cloud Volumes ONTAP is NetApp’s enterprise data management platform for the cloud, and builds on cloud storage services such as Amazon EBS, Amazon S3, Azure Managed Disks, and Azure Blob to give users a complete solution for NFS, SMB, and iSCSI storage in cloud, hybrid and multi-cloud environments. Cloud Volumes ONTAP reduces cloud storage costs through a set of sophisticated storage efficiency features, helps to protect data with snapshots and high availability, and supports many other crucial features for managing data, such as BlueXP replication for highly-efficient data replication.
Deployments of Kubernetes on AWS/Azure/GCP or on-prem, can make use of Cloud Volumes ONTAP from directly within a cluster by using Astra Trident. Trident is the CSI-compliant storage provisioner that enables dynamic provisioning in Cloud Volumes ONTAP in response to Kubernetes persistent volume claims. Advanced storage features, such as cloning an existing persistent volume using NetApp FlexClone®, data protection for persistent volumes, and storage efficiency features for improving storage costs, are all available via standard Kubernetes manifests. BlueXP now makes Kubernetes deployment with Trident very easy to accomplish.
In this section we’ll provide step-by-step instructions on using BlueXP to provision persistent volumes for Kubernetes.
BlueXP uses a graphical, web-based interface that makes it easy to set up Cloud Volumes ONTAP storage services and organize them across multiple tenants for better overall manageability. On-premises systems, Azure deployments, Google Cloud deployments, and AWS deployments can all be controlled from a single dashboard, and BlueXP replication relationships created between them with a simple drag and drop.
BlueXP also allows us to deploy Trident to a Kubernetes cluster and then relate the cluster to Cloud Volumes ONTAP instances.
Note that while this walkthrough will use Cloud Volumes ONTAP for AWS, the process shown here is similar when using Azure and GCP storage as the backend via Cloud Volumes ONTAP, when using the managed Kubernetes services Amazon EKS, AKS, and GKE, when using FSxN as the storage platform, and with bring-your-own-cluster software such as Red Hat OpenShift.
Before you can start you should make sure that you have network access between BlueXP, the instances of Cloud Volumes ONTAP to be used, and the actual Kubernetes cluster. BlueXP will also require internet access in order to download the latest deployment packages for Trident. You should also have your kubeconfig file downloaded from Kubernetes.
In this section we are going to show how to associate your Kubernetes cluster with Cloud Volumes ONTAP, connect with the Trident CSI provisioner, and define storage classes.
Next, we will create a PVC through AWS CloudShell, and then validate it in order to test our new Kubernetes environment.
Now we will walk through how to create a persistent volume claim that will be attached to the cluster we created in the previous section. This will be done using AWS CloudShell.
[cloudshell-user@ip-10-0-180-131 ~]$ cat nfs-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-pvc
spec:
storageClassName: shared-nfs-cm
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi [cloudshell-user@ip-10-0-180-131 ~]$
[cloudshell-user@ip-10-0-180-131 ~]$ kubectl apply -f nfs-pvc.yaml
[cloudshell-user@ip-10-0-180-131 ~]$ kubectl get pvc
In this step you’ll confirm that your volumes were set up and that Cloud Volumes ONTAP and your Kubernetes cluster are aligned.
BlueXP gives NetApp users leveraging Kubernetes an easy way to provision persistent storage using Cloud Volumes ONTAP. Leveraging Astra Trident, volumes on AWS, Azure, or Google Cloud will be dynamically provisioned as your clusters require.
Once set up, all of Cloud Volumes ONTAP’s data management capabilities can now be applied to your Kubernetes persistent storage including, high availability, data protection, cost-reducing storage efficiencies and much more.