Persistent Storage for Containers: What is it? Its Benefits, Use Cases and More

Carol Platz Vice President of Marketing at Lightbits Labs
Carol Platz
Technology Evangelist and Marketing VP
September 01, 2021

In the last few years, Kubernetes has emerged as a de facto standard for container orchestration and a go-to way to run microservices. This has led to an ongoing concern about data storage issues such as where the data is being stored, how much capacity there is for data, and how we retrieve it.

The answer to all these questions lies in one concept: persistent storage.

Persistent storage is crucial for containers in computer systems. This is because if all data were volatile, we couldn’t keep it permanently for later use, as it would be gone once the system is turned off.

Persistent storage is necessary to keep our files and data for later use. For instance, a hard disk drive is a perfect example of persistent storage because it lets us permanently store a variety of data.
In this blog, we cover persistent storage, its benefits, persistent storage for containers, how to link Kubernetes to persistent storage via NVMe®, and more.

Overview

What is Persistent Storage?
Benefits of Persistent Storage
Persistent Storage and Containerization
Persistent Storage in Kubernetes
Importance of Persistent Block Storage for Modern Application Development
Persistent Storage Use Case
Linking Kubernetes to Persistent Storage via NVMe®

What is Persistent Storage?

Also known as non-volatile storage, persistent storage refers to any of the data storage devices that can retain data even after there is no power supply to that device.

Common types of persistent storage include magnetic media such as hard disk drives and tapes, as well as optical media such as DVDs. Persistent storage structures can typically take the form of storage for files, blocks, or objects.

Benefits of Persistent Storage

Among the key advantages of persistent storage are:

Simplicity: Persistent storage helps developers provision storage without needing deep storage expertise. It simply allows them to provision volumes for both on-premise/ public cloud services.

Security: When it comes to the security and encryption aspects of storage solutions, persistent storage scores high. It meets most enterprises’ security requirements for volume-level encryption, self-encrypting disks, and key management, among others, to protect against data loss and security breaches.

Flexibility: Persistent storage offers you great flexibility over traditional storage and lets you use the same software across different virtual machines, clouds and containers. Developers can also choose storage interfaces for their workload, including file, block, or object storage. It also lets developers deliver data services with one system, regardless of protocol, boosting productivity, offering more freedom, and enabling more effective application development.

Portability: Today’s cloud-native world requires organizations to adopt a hybrid cloud approach to combine the benefits of public and on-premises clouds. Persistent storage makes it easy to migrate stateless applications across multiple clouds and move data between clouds.

Efficiency: Persistent storage makes application development much more efficient. It eliminates the need to rewrite applications when you want to port them from one cloud provider to another and you can simply move applications without expensive or time-consuming rewrites whenever you want.

Cost-effectiveness: With persistent storage, you pay only for the storage and compute you use. It scales on-demand with no disruptions, growing and shrinking automatically as you add and remove files.

Persistent Storage and Containerization

Containers are a key ingredient for building an agile, DevOps-oriented infrastructure and have emerged as an easy way to port software to wherever it needs to be. In containerization, persistent storage refers to storage volumes typically associated with applications, such as databases, that you can access even if the application is shut down/ processed.

In recent years, containerization has emerged as a common way to package software and its operating systems into transportable and isolated modules that are generated and destroyed as much as possible. Originally, containers did not allow permanent storage, which meant all data generated by a containerized app disappeared once the app completed its function and the container was destroyed.

However, software and storage vendors have recently developed methods to retain data generated by container applications and safely keep it in familiar storage volumes. Persistent storage helps resolve the issue of ephemeral storage volumes (which generally live and die with stateless apps).

Persistent Storage in Kubernetes

Kubernetes is primarily an open-source container orchestration framework. It provides management and service capabilities required to efficiently deploy, operate, and scale containers in a cloud/cluster environment.

Kubernetes storage is useful for storage administrators because it lets them manage multiple types of persistent and non-persistent data in a Kubernetes cluster. This enables them to create dynamic storage resources that can serve different types of applications.

With proper management, Kubernetes storage can automatically provision the most appropriate storage for a range of applications, with minimal administrative overhead.

To enable persistent storage, Kubernetes primarily uses two main concepts as discussed below:

1. Persistent Volume (PV)

A PV is a storage element in a cluster, defined manually by an administrator or dynamically by a storage class. It has its own lifecycle, which is separate from the lifecycle of Kubernetes pods.

2. Persistent Volume Claim (PVC)

A PVC is primarily a storage request by a user, allowing any application running in a container to request storage. For instance, a container can specify the way it needs to access the data or the size of storage it requires.

Beyond access mode and storage size, administrators can offer PVs with custom properties such as performance level, disk type, or storage tier. Users can then request storage based on these custom parameters without knowing the underlying storage implementation details.

Importance of Persistent Block Storage for Modern Application Development

Development teams across the board are modernizing their applications by adopting containers, serverless, and microservices-based architectures. Most of these applications are stateful, making persistent storage a necessity.

Here are some of the reasons why cloud-native persistent storage is important for modern application development by offering many powerful capabilities and providing significant flexibility/portability for DevOps teams:

1. Developers working with a Kubernetes orchestrator find it simpler to create their resources for a project. A persistent storage layer can serve as a robust storage platform, giving developers confidence that it meets their data security and resilience requirements for modern application deployments.

2. With a viable software-defined persistent storage platform, development teams can easily define and adjust their data requirements for a project on the go instead of completing this process manually. They also don’t need to rely on storage administrators to provision storage.

3. Open source software-defined persistent storage allows for portable storage across various kinds of infrastructures, including virtual machines (VMs), bare metal, and public and private cloud environments.
Since data federation can also take place across hybrid and multi-cloud environments, developers can conveniently place sensitive data where it needs to be along with integrating applications and microservices from various multi-cloud deployments.

Persistent Storage Use Case

One of the top use cases of persistent storage:

Stateful Applications

A stateful application refers to a program that saves important data from the activities of one session for use in the subsequent session. The saved data here is called the application’s state.

The advent of persistent storage on Kubernetes made it possible to support stateful applications, unlike earlier versions.

For all these modern applications, persistent storage serves as a data foundation and allows data to persist in the application state.

Linking Kubernetes to Persistent Storage via NVMe

Optimal Kubernetes persistent storage requires a robust solution that is as flexible and portable as containers yet can perform like local NVMe® SSDs. Further, to preserve container portability, it must speak common network protocols and should not require special NIC’s apart from being standards-based, managed via an API and run on standard servers.

Lightbits SDS meets all these philosophical and technical requirements to be the best high-performance persistent storage solution for Kubernetes, leading to improved scaling and availability via clustering. It supercharges your Kubernetes-based applications while increasing reliability and flexibility by providing,

– Similar performance to flash Local Persistent Volumes with greater utilization of your storage investment
– Better and enhanced service levels and a better user experience with consistent latency
– Faster rebuild time with higher resiliency levels
– No changes to your TCP/IP network with no proprietary drivers on Kubernetes servers
– Simple and secure storage access to Kubernetes application servers

All in all, LightOS aims to transform commodity servers into a powerful storage pool linked via NVMe®/TCP to the Kubernetes cluster orchestrator, letting you separate storage from compute with less hassle and at a lower cost.

Additional Resources

Kubernetes and Lightbits Performance, Persistence, Simplicity
Cloud-Native Storage for Kubernetes
Disaggregated Storage
Ceph Storage
Kubernetes Storage
Edge Cloud Storage
NVMe® over TCP

About the writer
Carol Platz Vice President of Marketing at Lightbits Labs
Carol Platz
Technology Evangelist and Marketing VP