OpenEBS Installation
This guide will help you to set up, customize, and install OpenEBS and use OpenEBS Volumes to run your Kubernetes Stateful Workloads. If you are new to running Stateful workloads in Kubernetes, you will need to familiarize yourself with Kubernetes Storage Concepts.
note
Before you begin the installation, make sure all prerequisites are met.
#
How to set up and use OpenEBS?OpenEBS seamlessly integrates into the overall workflow tooling that Kubernetes administrators and users have around Kubernetes.
The OpenEBS workflow fits nicely into the reconciliation pattern introduced by Kubernetes, paving the way for a Declarative Storage Control Plane as shown below:
#
Installation via Helmwarning
The Helm chart registry at https://openebs.github.io/charts has now been deprecated as those charts are used to install legacy OpenEBS (v3.10 and below) releases. This registry will be migrated to a different registry location https://openebs-archive.github.io/charts by Oct 30, 2024.
The Helm charts for the latest OpenEBS (v4.0 and above) are hosted in a new registry location https://openebs.github.io/openebs. To ensure seamless access to OpenEBS Helm charts, update your configurations to use the new registry URL.
Verify helm is installed and helm repo is updated. You need helm 3.2 or more.
- Setup helm repository.
note
helm repo add openebs https://openebs.github.io/charts
has changed to helm repo add openebs https://openebs.github.io/openebs
.
OpenEBS provides several options to customize during installation such as:
- Specifying the directory where hostpath volume data is stored or
- Specifying the nodes on which OpenEBS components should be deployed and so forth.
info
The complete list of Helm chart images is available in the Helm chart annotations. You can view them using the command:
Refer to the OpenEBS helm chart for configurable options.
- Install the OpenEBS helm chart with default values.
The above command will install OpenEBS Local PV Hostpath, OpenEBS Local PV LVM, OpenEBS Local PV ZFS, and OpenEBS Replicated Storage components in openebs
namespace and chart name as openebs
.
important
The default OpenEBS helm chart will install both Local Storage and Replicated Storage. If you do not want to install OpenEBS Replicated Storage, use the following command:
If the CustomResourceDefinitions for CSI VolumeSnapshots are already present in your cluster, you may skip their creation by using the following option:
If you are utilizing a custom Kubelet location or a Kubernetes distribution that uses a custom Kubelet location, it is necessary to modify the Kubelet directory in the Helm values at installation time. This can be accomplished by using the --set
flag option in the Helm install command, as follows:
- For Local PV LVM
- For Local PV ZFS
- For Replicated PV Mayastor
Specifically:
For MicroK8s, the Kubelet directory must be updated to
/var/snap/microk8s/common/var/lib/kubelet/
by replacing the default/var/lib/kubelet/
with/var/snap/microk8s/common/var/lib/kubelet/
.For k0s, the default Kubelet directory (
/var/lib/kubelet
) must be changed to/var/lib/k0s/kubelet/
.For RancherOS, the default Kubelet directory (
/var/lib/kubelet
) must be changed to/opt/rke/var/lib/kubelet/
.
- To view the chart and get the output, use the following command:
Command
Output
#
Verifying OpenEBS Installation#
Verify Pods#
Default InstallationList the pods in <openebs>
namespace
In the successful installation of OpenEBS, you should see an example output like below:
#
Installation with Replicated Storage DisabledList the pods in <openebs>
namespace
In the successful installation of OpenEBS, you should see an example output like below:
#
Verify StorageClassesList the storage classes to check if OpenEBS has been installed with default StorageClasses.
In the successful installation, you should have the following StorageClasses created:
#
Post-Installation ConsiderationsFor testing your OpenEBS installation, you can use the openebs-hostpath
mentioned in the Local Storage User Guide for provisioning Local PV on hostpath.
You can follow through the below user guides for each of the engines to use storage devices available on the nodes instead of the /var/openebs
directory to save the data.
#
SupportIf you encounter issues or have a question, file a Github issue, or talk to us on the #openebs channel on the Kubernetes Slack server.