More about Kubernetes Storage
- How to Provision Persistent Volumes for Kubernetes with the NetApp BlueXP Console
- Fundamentals of Securing Kubernetes Clusters in the Cloud
- Kubernetes Storage Master Class: A Free Webinar Series by NetApp
- Kubernetes StorageClass: Concepts and Common Operations
- Kubernetes Data Mobility with Cloud Volumes ONTAP
- Scaling Kubernetes Persistent Volumes with Cloud Volumes ONTAP
- What's New in K8S 1.23?
- Kubernetes Topology-Aware Volumes and How to Set Them Up
- Kubernetes vs. Nomad: Understanding the Tradeoffs
- How to Set Up MySQL Kubernetes Deployments with Cloud Volumes ONTAP
- Kubernetes Volume Cloning with Cloud Volumes ONTAP
- Container Storage Interface: The Foundation of K8s Storage
- Kubernetes Deployment vs StatefulSet: Which is Right for You?
- Kubernetes for Developers: Overview, Insights, and Tips
- Kubernetes StatefulSet: A Practical Guide
- Kubernetes CSI: Basics of CSI Volumes and How to Build a CSI Driver
- Kubernetes Management and Orchestration Services: An Interview with Michael Shaul
- Kubernetes Database: How to Deploy and Manage Databases on Kubernetes
- Kubernetes and Persistent Apps: An Interview with Michael Shaul
- Kubernetes: Dynamic Provisioning with Cloud Volumes ONTAP and Astra Trident
- Kubernetes Cloud Storage Efficiency with Cloud Volumes ONTAP
- Data Protection for Persistent Data Storage in Kubernetes Workloads
- Managing Stateful Applications in Kubernetes
- Kubernetes: Provisioning Persistent Volumes
- An Introduction to Kubernetes
- Google Kubernetes Engine: Ultimate Quick Start Guide
- Azure Kubernetes Service Tutorial: How to Integrate AKS with Azure Container Instances
- Kubernetes Workloads with Cloud Volumes ONTAP: Success Stories
- Container Management in the Cloud Age: New Insights from 451 Research
- Kubernetes Storage: An In-Depth Look
- Monolith vs. Microservices: How Are You Running Your Applications?
- Kubernetes Shared Storage: The Basics and a Quick Tutorial
- Kubernetes NFS Provisioning with Cloud Volumes ONTAP and Trident
- Azure Kubernetes Service How-To: Configure Persistent Volumes for Containers in AKS
- Kubernetes NFS: Quick Tutorials
- NetApp Trident and Docker Volume Tutorial
Subscribe to our blog
Thanks for subscribing to the blog.
The benefits of scaling containers across a cluster in a Kubernetes deployment are clear. But if you’re running a stateful app, you need to find a way to provision persistent Kubernetes storage that won’t slow down your developers.
For most developers, that means dynamic storage provisioning. In this post we’ll show you how NetApp makes that easier than ever with Cloud Volumes ONTAP and Trident.
Jump down using the links below to learn more about:
- The Basics of Kubernetes Storage
- The Benefits of Dynamic Provisioning
- How Does Kubernetes Support Storage Natively?
- Kubernetes Dynamic Provisioning with Cloud Volumes ONTAP and NetApp Trident
The Basics of Kubernetes Storage
Let’s start with what we do know: Kubernetes provides an extensible framework for managing data storage within a Kubernetes cluster. But if your application needs data to persist—such as in a database—your storage volumes need to be persistent.
Persistent volumes (PVs) provide the means for data storage to exist independently of pods and containers. Each pod specification may include a number of persistent volume claims (PVCs), which instruct the cluster to search for a suitable PV based on the requested size, access mode, labels, etc. This gives PVs the additional advantage of separating out the request for storage by application developers deploying a pod, from the low-level details of how Kubernetes administrators decide to make the storage available to the cluster.
So, how do you go about provisioning those PVs? At a high level, there are the two main options available for provisioning storage for Kubernetes workloads: either static or dynamic persistent volume (PV) allocation.
Static provisioning is basically an upfront purchase of storage that will be used to serve all your cluster’s needs. When using static allocation, administrators need to pre-allocate all PVs. This can be tricky, because to optimize costs and avoid additional allocations, you need precise foreknowledge of how the cluster’s storage resources will be used.
In some ways, that means you need to be able to predict the future. This makes it less ideal than the other provisioning method that is the main focus of this article: dynamic provisioning.
The other option is to use dynamic provisioning. In Kubernetes, dynamic provisioning means PVs are created more organically, giving your clusters an advantage when it comes to dealing with changing storage demands. Don’t know how much storage your pods are going to take up? Better go with dynamic provisioning. Most of the time in Kubernetes deployments, this will be the case. However, Kubernetes can't allocate those storage volumes for you on its own— that's where NetApp can help.
The Benefits of Kubernetes Dynamic Provisioning
Using dynamic provisioning in a Kubernetes cluster adds a number of benefits:
- Automatic provisioning: Since dynamic provisioning creates volumes as soon as they are needed, it reduces a lot of the administrative overhead involved in manually creating PVs.
- Reduced storage spending: Automatically allocating and deallocating PVs in response to PVCs can also help to reduce wasted storage that is allocated but never used. It also eliminates the overhead of pre-provisioning volumes and managing their lifecycle.
- Optimized performance: PVCs that are fulfilled dynamically make use of a storage class attribute to specify the type of storage required, which allows for data to be tiered by I/O performance profile.
How Does Kubernetes Support Storage Natively?
Kubernetes comes with a variety of internal provisioners (in-tree plugins) that dynamically allocate storage using Amazon EBS, Google Persistent Disk, Azure Disk Storage, and other storage platforms. They can be used to provision storage for standalone Kubernetes clusters in the cloud or in managed clusters such as Azure Kubernetes Service (AKS), Amazon Elastic Container Service (Amazon ECS), or Google Kubernetes Engine (GKE).
Kubernetes does have in-tree plugin code that can allocate storage which is basically part of the core Kubernetes code. However, in-tree plugins posed a challenge in terms of supporting additional storage systems or upgrading existing systems because the plugin had to be dependent on Kubernetes release cycles. Container Storage Interface (CSI) strives to solve this problem.
CSI provides a standard for storage vendors to develop plugins that work with multiple container orchestration platforms including Kubernetes. CSI provides Kubernetes with a set of storage API primitives that can be used to perform storage operations, i.e., allocate, deallocate, attach, snapshot, clone, etc. However, it doesn't handle the storage layer itself.
This is where NetApp storage and Trident comes in.
Kubernetes Dynamic Provisioning with Cloud Volumes ONTAP and NetApp Trident
NetApp Trident is a dynamic container storage interface (CSI) for use in Kubernetes. Trident automatically caters to persistent volume claims in Kubernetes by leveraging Azure disk storage, AWS EBS block storage, GCP Persistent Disks via Cloud Volumes ONTAP or on-premises ONTAP appliances.
This enables Kubernetes clusters to take advantage of the power of NetApp storage management for PV provisioning in on-premises, hybrid cloud, or multicloud environments without any oversight or additional effort from developers.
Below you can see an example of a Trident storage class definition that uses ONTAP as storage backend:
apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: name: ontap-gold provisioner: csi.trident.netapp.io mountOptions: - debug parameters: backendType: "ontap-nas" media: "ssd" provisioningType: "thin" snapshots: "true"
Cloud Volumes ONTAP uses native cloud compute and storage services to create a virtual NetApp storage appliance in either AWS, Azure or GCP. This provides many features and benefits that just don’t exist when directly allocating storage, including:
- Thin provisioning: Large PVs can be allocated using Cloud Volumes ONTAP without actually consuming storage space. Instead, volumes grow automatically as required, which avoids the wasteful allocation of cloud storage based on initial estimated requirements that may end up not being used.
- Deduplication and compression: Cloud Volumes ONTAP helps to reduce cloud storage footprint by using built-in technologies for transparently deduplicating and compressing the data that it stores. Both of these features can be used together to cut down storage overhead by as much as 50-70% in some cases, which leads to significant operational cost savings.
- Storage tiering: Kubernetes administrators can easily map different storage classes to data aggregates in Cloud Volumes ONTAP that are built from any of the available Amazon EBS disk types, Standard and Premium Azure Disks or zonal persistent disks in GCP. Cloud Volumes ONTAP can also automatically tier the cold data in PVs to low-cost object storage, such as Amazon S3 or Azure Blob.
- Persistent volume cloning: Using NetApp FlexClone®, Cloud Volumes ONTAP can instantly create writable clones of an existing PV of any size. Trident can integrate with FlexClone to deploy clones of an existing persistent volume instead of always allocating new storage. This has huge advantages for setting up test clusters and DevOps CI/CD pipelines, and for cutting down on storage usage and costs.
- Instant backup and restore: ONTAP snapshots are always created instantly, regardless of source data size, are highly space efficient, and can also be instantly restored back to the source volume. Using NetApp SnapCenter®, application-aware snapshots are created in conjunction with running applications to ensure that in-flight I/O operations are handled appropriately.
- High availability: Native cloud storage solutions, such as Amazon EBS and Azure Disk, provide local redundancy within an Availability Zone, but in enterprise deployments this may not provide the necessary zero RPO. Cloud Volumes ONTAP HA offers greater levels of protection by setting up a pair of active-active storage nodes across Availability Zones that synchronously replicate changes to each other.
- Data replication: SnapMirror® is NetApp’s solution for incremental, block-level replication of storage volumes allocated using ONTAP storage services. This allows PV to be replicated to and from the cloud and on-premises systems or between different deployments of Cloud Volumes ONTAP.
- IAC capabilities: Trident provides the tridentctl command line tool for administrators to easily review and manage the storage resources they are using. BlueXP Console is the web-based GUI interface used for deploying and managing Cloud Volumes ONTAP. Both Trident and BlueXP Console also provide RESTful APIs to enable process automation.
- Hybrid/Multicloud support: Trident supports on-premises ONTAP storage appliances, as well as deployments of Cloud Volumes ONTAP in AWS, Azure and GCP. This gives cluster administrators a uniform interface for managing and enhancing storage wherever it resides, whether in multicloud deployments or hybrid storage scenarios.
For all the good that Kubernetes does, you still need to allocate storage for the workload you’re running on it. Kubernetes dynamic provisioning simplifies the deployment of persistent volumes within Kubernetes clusters, doing away with the need for administrators to manually allocate storage in advance. NetApp Trident enables PVs to be provisioned using Cloud Volumes ONTAP, which perfectly complements the container orchestration capabilities of Kubernetes with NetApp’s enterprise-grade storage solutions.