OpenEBS Installation on OpenShift
Overview#
This document provides detailed instructions for installing OpenEBS Replicated PV Mayastor and Local PV LVM on OpenShift. It guides you through the required prerequisites, installation steps, and verification procedures to ensure a successful deployment.
Using OpenEBS with OpenShift delivers cloud-native, container-aware storage designed for dynamic provisioning and scalability. This integration simplifies persistent storage management for stateful applications such as databases and message queues, while seamlessly aligning with OpenShift’s ecosystem and DevOps workflows.
Requirements#
Before you begin, make sure that you meet the following requirements:
- Review and follow steps in Prerequisites documentation.
- 2MiB-sized Huge Pages must be supported and enabled on the storage nodes i.e. nodes where IO engine pods are deployed. A minimum number of 1024 such pages (i.e. 2GiB total) must be available exclusively to the IO engine pod on each node. Huge pages in the OpenShift Container Platform (OCP) can be enabled during the installation or it can be enabled by creating new machine configs post-installation. Refer to the Red Hat Documentation for more details.
Install Replicated PV Mayastor and Local PV LVM on OpenShift#
Create a Namespace.
Install the OpenEBS Helm chart.
:::important
- Local PV ZFS Disabled: The ZFS package is not supported on Red Hat Enterprise Linux CoreOS (RHCOS). As a result, Local PV ZFS is disabled by default for OpenShift installations.
- VolumeSnapshot CRDs Disabled in Helm: VolumeSnapshot CustomResourceDefinitions (CRDs) are preinstalled in OpenShift. The Helm chart is configured to skip their installation to avoid redundancy. :::
In a separate client session, add the required service accounts to the privileged Security Context Constraints (SCC).
Verify that all pods in the
openebsnamespace are running.Sample Output
Create a DiskPool Using CLI.
List available block devices on the node.
Sample Output
note
Modify the name, node, and disks fields in the configuration file to match your environment settings before applying it.
Apply the following configuration to create a DiskPool.
Sample Output
Verify DiskPool Status.
Sample Output
Create a StorageClass.
Create a file named
storageclass.yamlwith the following configuration:Apply the configuration:
note
Refer to the Replicated PV Mayastor StorageClass Parameters documentation for detailed information about supported parameters and configuration options.
Create a Persistent Volume Claim (PVC).
Verify that the PVC status is Bound.
Verify the created StorageClasses.
Sample Output
Verify the PVC.
Sample Output
Install Local PV LVM on OpenShift#
Create a Namespace.
Install the OpenEBS Helm chart with the Local PV LVM enabled and other storages disabled.
:::important
- Local PV ZFS Disabled: The ZFS package is not supported on Red Hat Enterprise Linux CoreOS (RHCOS). As a result, Local PV ZFS is disabled by default for OpenShift installations.
- VolumeSnapshot CRDs Disabled in Helm: VolumeSnapshot CustomResourceDefinitions (CRDs) are preinstalled in OpenShift. The Helm chart is configured to skip their installation to avoid redundancy. :::
In a separate client session, add the required service accounts to the privileged SCC.
Verify that all pods in the
openebsnamespace are running.Sample Output
Create a StorageClass.
Create a file named
storageclass.yamlwith the following configuration:Apply the configuration:
note
Refer to the Local PV LVM StorageClass Parameters documentation for detailed information about supported parameters and configuration options.
Create a PVC.
Verify that the PVC status is Bound.
Verify the created StorageClasses.
Sample Output
Verify the PVC.
Sample Output
Benefits of Using OpenEBS on OpenShift#
Cloud-Native and Container-Aware Storage: OpenEBS is designed to work in a cloud-native, containerized environment that aligns well with OpenShift's architecture. It offers Container Native Storage (CNS), which runs as microservices in the Kubernetes cluster, providing dynamic storage provisioning with high flexibility.
Dynamic and Scalable Storage: OpenEBS allows the provisioning of persistent volumes dynamically. This is particularly useful in OpenShift environments where applications may scale rapidly, and on demand, with minimal manual intervention.
Storage for Stateful Applications: OpenShift often hosts stateful applications like databases (MySQL, PostgreSQL, Cassandra), message queues, and other services requiring persistent storage. OpenEBS supports various storage engines, such as Replicated PV Mayastor enabling optimized storage performance depending on the workload type.
Simplified Storage Operations: With OpenEBS, storage can be managed and operated by DevOps teams without requiring specialized storage administrators. It abstracts away the complexity of traditional storage solutions, providing a Kubernetes-native experience.
Easy Integration with OpenShift Features: OpenEBS can integrate seamlessly with OpenShift’s features like Operators, pipelines, and monitoring tools, making it easier to manage and monitor persistent storage using OpenShift-native tools.