More about Kubernetes Storage
- 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
- How to Use NetApp Cloud Manager for Provisioning Persistent Volumes in Kubernetes
- 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
Storage is required by containers and pods for a variety of purposes, from caching data to building stateful applications, such as database services. Kubernetes storage uses persistent volumes to create a separation between the application developers that simply require storage for their pods and the lower level details of how that storage is provisioned.
This layer of abstraction allows the storage implementation to be controlled independently of requesting applications. That means that, for example, storage can be provisioned using local storage in a development cluster and with a more robust solution in production.
In this article, we will take a look at Kubernetes persistent volume provisioning in detail and show how dynamic provisioning with NetApp Trident and Cloud Volumes ONTAP creates a compelling solution for deploying and managing storage in a Kubernetes cluster.
Provisioning Persistent Volumes
What are persistent volumes? Persistent volumes provide storage resources to pods in the same way that nodes provide compute. Each persistent volume is created by a provisioner that uses a plugin to interface with different types of backend storage, with support for Amazon EBS, Google Persistent Disk, and Azure Disk Storage among many others. The lifetime of a persistent volume is determined by its reclaim policy, which controls the action the cluster will take when a pod releases its ownership of the storage.
kind: PersistentVolume apiVersion: v1 metadata: name: pv0003 spec: capacity: storage: 10Gi accessModes: - ReadWriteMany nfs: path: "/mnt/data" server: 172.17.0.2
This is how it works: Each pod uses a persistent volume claim to bind to storage from the cluster of a particular size, access mode, and volume mode. The claim can also use a selector to only match volumes with a specific set of labels. On receiving a claim, the cluster will search for an existing persistent volume with which to fulfil the request. Cluster administrators can pre-allocate persistent volumes for the cluster, known as static provisioning, however, this requires prior knowledge of storage requirements as a whole.
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: thepub spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi storageClassName: bronze
There’s another way to do this too. Dynamic volume provisioning is an alternative model for managing storage provisioning in Kubernetes, and is used to automatically deploy persistent volumes based on the claims received by the cluster. The Kubernetes storage class specified by a persistent volume claim defines the provisioner to be used to create the new persistent volume. Kubernetes provides a number of its own internal Kubernetes provisioners that make use of the plugins mentioned above, however, external provisioners are also supported.
Cloud Volumes ONTAP and NetApp Trident
Cloud Volumes ONTAP brings the power of NetApp appliances to AWS storage and Azure storage through the use of the native compute and storage resources available in each cloud environment. Cloud Volumes ONTAP provides major advantages for storage management in the cloud, including:
- Storage Efficiencies: Cloud Volumes ONTAP reduces cloud storage footprint and costs through several built-in technologies, such as data deduplication and data compression. Thin provisioning removes the need to pre-allocate large volumes of storage that may not end up being used, and instead lets you grow as you go.
- Data Tiering: In order to further improve cost effectiveness for infrequently-used data, Cloud Volumes ONTAP offers data tiering: the ability to transparently move cold data to Amazon S3 or Azure Blob and move it back into the performance tier on client access.
- High Availability: To ensure that data is always accessible and resilient against data loss, Cloud Volumes ONTAP HA deploys a failover pair of nodes that can be placed across Availability Zones.
- Data Protection: Snapshots provide an instant and space efficient backup solution for the data stored in Cloud Volumes ONTAP, which can be instantly restored back to the source volume at any time. Using SnapMirror® for data replication, storage volumes can be replicated to other Cloud Volumes ONTAP deployments, or integrated with on-premises systems in a hybrid cloud environment.
- Storage Cloning: Cloud Volumes ONTAP uses NetApp FlexClone® to instantly clone an existing storage volume and make it available for read/write access. This process does not involve any data copying and only requires storage space for the changes made to the clone.
NetApp Trident is a fully-supported, open-source storage provisioner for Kubernetes that uses Cloud Volumes ONTAP or on-premises NetApp ONTAP systems for its backend storage. This allows pods to automatically access the storage they require, while at the same time benefiting from the data management capabilities of Cloud Volumes ONTAP. For example, as well as provisioning new storage volumes, Trident can also integrate with storage cloning to create a clone of an existing volume in response to a persistent volume claim. This is ideal for supporting DevOps pipelines and building test clusters.
Kubernetes persistent volumes create a separation between containerized applications and the storage they use, which enables much greater flexibility when it comes to how that storage is provisioned. The Trident provisioner from NetApp leverages the effectiveness of the Cloud Volumes ONTAP data management platform from within Kubernetes, adding great value to your use of cloud storage.
Learn more about how Cloud Volumes ONTAP supports Kubernetes Persistent Volume provisioning and management requirements of containerized workloads, and how Cloud Volumes ONTAP helps to address the challenges of containerized applications in these Kubernetes Workloads with Cloud Volumes ONTAP Case Studies.