Topics covered in this article:
Abstract
This article provides the instructions on how to install a limited version of OpenEBS that only support OpenEBS Local PV.
Prerequisites
- Kubernetes 1.12 or higher.
- Administrator privileges to the Kubernetes Cluster to install OpenEBS components.
- Some of the configurations below may depend on the type of Managed Kubernetes Service that you are using. For example, when using Rancher Kubernetes, you may have to set up extra bind mounts for hostpath or when using with CentOS or OpenShift, you may need to set up the Security Context appropriately. For more details please refer to the OpenEBS documentation or leave a comment on this article.
- OpenEBS version 1.1.0 or higher.
Installation
Install using kubectl
kubectl apply -f https://openebs.github.io/charts/openebs-operator-lite.yaml
Install using helm stable charts
helm repo update
helm install --namespace openebs --name openebs stable/openebs --values https://openebs.github.io/charts/openebs-lite-helm-values.yaml
Install Storage Classes
kubectl apply -f https://openebs.github.io/charts/openebs-lite-sc.yaml
Additional Details
Container Images used by OpenEBS Local PV
OpenEBS Local PV functionality is provided by the following containers.
- Dynamic Provisioner. quay.io/openebs/provisioner-localpv:1.1.0, contains the dynamic provisioning logic for OpenEBS Local PV. Supports both host path and device based Local PVs.
- Hostpath Helper. quay.io/openebs/openebs-tools:3.8, is a helper container for managing the host path directories for OpenEBS Local PV with host path.
- Node Block Device Manager. quay.io/openebs/node-disk-manager-amd64:v0.4.1, runs as a DaemonSet on all the Kubernetes Storage nodes and helps with discovering the attached Block Devices.
- Node Block Device Operator. quay.io/openebs/node-disk-operator-amd64:v0.4.1, required for dynamically claiming a Block Device for Local PV in device mode.
- Device Helper. quay.io/openebs/linux-utils:3.9, is a helper container used by node-disk-operator to clean up the Block Devices after they have been released.
- Validation WebHook. quay.io/openebs/admission-server, is currently installed only via helm. There are no validation at the moment for Local PV, but it is good to have it in there.
Kubernetes Specifications for deploying OpenEBS Local PV
- RBAC settings like Namespace, ServiceAccount, ClusterRole and ClusterRoleBinding. The recommendation is to use the same RBAC setting used by the regular OpenEBS deployment to make it easier to upgrade to a full fledged OpenEBS installation with other storage engine support and also to make it easier to keep up with the changes in the upcoming releases.
- Deployment - OpenEBS Local PV Dynamic Provisioner. The key component of the Local PV feature. This deployment needs to take the Hostpath Helper image as environment variable.
- OpenEBS NDM Components, required if OpenEBS Local PV with block devices is required. Recommendation is to have it installed as NDM will be enhanced in future to report metrics on the hostpath as well.
- NDM ConfigMap that specifies the block devices that need to be excluded or included.
- NDM DaemonSet, This is required if OpenEBS Local PV with block devices is used. Uses the above ConfigMap for filtering block devices used for Local PV.
- NDM Operator, also required when using OpenEBS Local PV with block devices. The Device Helper image should be passed as environment variable.
- OpenEBS Admission Webhook, installed when using helm to setup. Validates the PVC create and delete requests. As of version 1.1.0, no validations have been added for Local PV. Recommended to having it running to minimize the changes required for helm installation.
Customization
This section describes the various parameters that can be customized for Local PV.
- If you are running in a air-gapped environment, you will need to have the above containers loaded into your local container repositories. The operator YAML or the helm values YAML should be updated with your custom images.
- Specify the correct hostpath in the StorageClass.
- When using Local PV with host devices, modify the NDM ConfigMap to include or exclude block devices from being used for Local PV.