← Back to blog
bpdubuntu

Adding Persistent Storage to Kubernetes with OpenEBS Hostpath

11 December 2025bpd · ubuntu

Giving Your Stateful Applications a Place to Store Data

By default, data inside a Pod is ephemeral; if the Pod is deleted, its data is lost. For stateful applications like databases, you need persistent storage. The ‘Ubuntu System Administration Guide’ shows how to set up a simple storage solution for your on-premise cluster using OpenEBS.

What is a StorageClass?

Kubernetes uses an abstraction called a ‘StorageClass’ to define different types of available storage. When your application requests storage via a ‘PersistentVolumeClaim’ (PVC), Kubernetes uses the default StorageClass to dynamically provision a ‘PersistentVolume’ (PV) that fulfills that request.

Using OpenEBS Hostpath

OpenEBS is a popular open-source storage solution for Kubernetes. The book demonstrates how to install the OpenEBS operator and its ‘hostpath’ provisioner. The hostpath provisioner uses the local disk of the Kubernetes worker nodes to provide storage. While not suitable for multi-node high availability, it is an excellent and simple way to get persistent storage up and running for single-replica stateful applications in your cluster.


This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13