OpenEBS Install Prerequisites
This guide will help you to verify that your Kubernetes worker nodes have the required prerequisites to install OpenEBS and use OpenEBS Volumes to run your Kubernetes Stateful Workloads. In addition, you will learn about how to customize the installer according to your managed Kubernetes provider.
OpenEBS provides block volume support through the iSCSI protocol. Therefore, the iSCSI client (initiator) presence on all Kubernetes nodes is required. Choose the platform below to find the steps to verify if the iSCSI client is installed and running or to find the steps to install the iSCSI client.
#
Choose the platform for iSCSI client settingsProvide feedback if a platform is missing in the above list.
#
Linux platformsInstallation of the iSCSI initiator service and tools depends on your host O/S or the kubelet container. You can follow the below steps for installation/verification of the required packages. It is a mandatory step to verify the iSCSI services and make sure that it is running on all the worker nodes. OpenEBS uses iSCSI protocol to connect to the block volumes.
#
UbuntuVerify iSCSI services are configured
If iSCSI initiator is already installed on your node, check that the initiator name is configured and iSCSI service is running using the following commands.
If the service status is shown as Inactive
, then you may have to enable and start iscsid service using the following command.
The following is the expected output.
Install iSCSI tools
If iSCSI initiator is not installed on your node, install
open-iscsi
packages using the following commands.
You can verify the iSCSI installation from above section.
#
Red Hat Enterprise LinuxVerify iSCSI services are configured
In Red Hat Enterprise Linux 7, the iSCSI service is lazily started by default: the service starts after running the iscsiadm
command. If an iSCSI initiator is already installed on the node, check that the initiator name is configured using the following command.
Check iSCSI service is running using the following command.
If the status is shown as Inactive
, then you may have to enable and start the iscsid service using the following command.
The following is the expected output.
Install iSCSI tools
If iSCSI initiator is not installed on your node, install iscsi-initiator-utils
packages using the following command.
You can verify the iSCSI installation from above section.
#
CentOSVerify iSCSI services are configured
If iSCSI initiator is already installed on your node, check that the initiator name is configured using the following commands.
Check iSCSI service is running using the following command.
If the status is showing as Inactive
, then you may have to enable and start the iscsid service using the following command.
Install iSCSI tools
If an iSCSI initiator is not installed on your node, install iscsi-initiator-utils
packages using the following command.
You can verify the iSCSI installation from the above section.
#
Managed Kubernetes Services on Public CloudAmazon Elastic Container Service for Kubernetes (EKS)
Amazon EKS clusters can be brought up with either an AmazonLinux AMI or an Ubuntu 18.04 AMI.
For clusters running with the AmazonLinux AMI
Verify iSCSI services are configured
If iSCSI initiator is already installed on your node, check that the initiator name is configured using the following commands.
Check the iSCSI service is running using the following command.
If the status is shown as Inactive
, then you may have to enable and start the iscsid service using the following command.
Install iSCSI tools
If iSCSI initiator is not installed on your node, install iscsi-initiator-utils
packages using the following command.
You can verify the iSCSI installation from the above section.
#
For clusters running with the Ubuntu 18.04 AMIFor setting up iSCSI clients on Ubuntu nodes, see the instructions here.
#
Google Kubernetes Engine (GKE)GKE Container-Optimized OS does not come with an iSCSI client preinstalled and does not allow installation of iSCSI client. Therefore, OpenEBS does not work on Kubernetes clusters which are running GKE Container-Optimized OS on the worker nodes.
Select Ubuntu as the image version for the node pools in the custom settings. For setting up iSCSI clients on Ubuntu nodes, see the instructions here.
#
Azure Kubernetes Service (AKS)On Azure Kubernetes Service you need to verify that the open-iscsi
packages are installed and running the service on the kubelet. This can be checked by connecting to the nodes through SSH using the public IP addresses by running the following command.
Note: azureuser
is a default username.
Verify iSCSI services are configured
Obtain the container ID of the hyperkube kubelet on each node using the following command.
Following is the example output:
Once kubelet container ID is obtained, you need to get to the shell of this container using the following command.
Example:
Check the status of the iSCSI service by using the following command.
Install iSCSI tools
You have to get the kubelet container ID using the steps mentioned in the above section. Once kubelet container ID is obtained, you need to get into the shell of this container using the following command.
Example:
Run the following commands to install and configure iSCSI service in the kubelet.
You can verify the iSCSI installation from the above section.
#
DigitalOceanAdd extra_binds in Kubelet Service
Add the following lines (volume mounts) to the file /etc/systemd/system/kubelet.service
on each of the nodes
So, the updated Kubelet Service File is as below:
Next, you need to restart the Kubelet Service on each node using the following commands
#
Kubernetes On-Prem Solutions#
Red Hat OpenShiftDetailed installation instructions for OpenEBS on OpenShift are in the Knowledge Base.
#
RancherYou will need to enable iSCSI services on all of the hosts of your Rancher-based Kubernetes cluster.
#
iSCSI services on RKE/Rancher 2.xStep 1: Verify iSCSI initiator is installed and services are running on all of the hosts (control plane/etcd/worker).
Operating system | iSCSI Package | Commands |
---|---|---|
RHEL / CentOS | iscsi-initiator-utils | sudo yum install iscsi-initiator-utils -y sudo systemctl enable --now iscsid |
Ubuntu / Debian | open-iscsi | sudo apt install -y open-iscsi sudo systemctl enable --now iscsid |
Step 2: Add extra_binds
under services.kubelet
in cluster YAML
After installing the initiator tool on your nodes, edit the YAML for your cluster. Edit the kubelet configuration section to mount the iSCSI binary and configuration, as shown in the sample below.
For an RKE cluster, you can add the extra_binds
to your cluster.yml file. For a Rancher 2.x cluster, you can edit your cluster's configuration options and add the extra_binds
there.
In the above snippet, default hostpath for Local PV (/var/openebs/local), which will be created on the worker node using openebs-hostpath
StorageClass, is added under extra_binds
. This configuration will help to create default hostpath directory on worker node for provisioning openebs-hostpath
volume.
#
iSCSI services on RancherOSTo run iSCSI services, execute the following commands on each of the cluster hosts or nodes.
Run below commands on all of the nodes to make sure the below directories are persistent. By default these directories are ephemeral.
Edit the kubelet configuration section of your RKE/Rancher 2.x cluster to mount the OpenEBS Local PV hostpath default directory on to the kubelet container.
In the above snippet, default hostpath for Local PV (/var/openebs/local), which will be created on the worker node using openebs-hostpath
StorageClass, is added under extra_binds
. This configuration will help to create default hostpath directory on worker node for provisioning openebs-hostpath
volume.
note
The CSI driver based implementation of cStor storage engine is not compatible with RancherOS.
#
KonvoyKonvoy is a managed Kubernetes platform for operation and lifecycle management from D2iQ. CentOS 7.6 is used as the underlying node OS by default. Only prerequisite for setting up OpenEBS in Konvoy is to have iSCSI client on the CentOS nodes. For setting up iSCSI client on CentOS nodes, see the instructions here. More details about setting up of OpenEBS in Konvoy can be found here.
#
IBM Cloud Private (ICP)OpenEBS can be installed using ICP on the following Operating Systems. Latest tested ICP versions are 2.1.0.3 and 3.1.1.
On RHEL 7
On Ubuntu
#
On RHELLatest tested RHEL versions are 7.5, 7.6.
For setting up iSCSI clients on RHEL nodes, see the instructions here.
#
On UbuntuLatest tested Ubuntu version are Ubuntu 16.04 LTS and 18.04 LTS.
For setting up iSCSI clients on Ubuntu nodes, see the instructions here.