Prerequisites (iSCSI client)
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 settings
Provide feedback if a platform is missing in the above list.
Linux platforms
Installation 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 the iSCSI protocol to connect to the block volumes.
Ubuntu
Verify iSCSI services are configured
If an iSCSI initiator is already installed on your node, check that the initiator name is configured and iSCSI service is running using the following commands.
sudo cat /etc/iscsi/initiatorname.iscsi
systemctl status iscsid
If service status is showing as Inactive
, then you may have to enable and start the iscsid service using the following command.
sudo systemctl enable iscsid && sudo systemctl start iscsid
The following is the expected output.
systemctl status iscsid
● iscsid.service - iSCSI initiator daemon (iscsid)
Loaded: loaded (/lib/systemd/system/iscsid.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2019-02-18 11:00:07 UTC; 1min 51s ago
Docs: man:iscsid(8)
Process: 11185 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS)
Process: 11170 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS)
Main PID: 11187 (iscsid)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/iscsid.service
├─11186 /sbin/iscsid
└─11187 /sbin/iscsid
Install the iSCSI tools
If an iSCSI initiator is not installed on your node, install open-iscsi
packages using the following commands.
sudo apt-get update
sudo apt-get install open-iscsi
sudo service open-iscsi restart
You can verify the iSCSI installation from above section.
Red Hat Enterprise Linux
Verify 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.
cat /etc/iscsi/initiatorname.iscsi
Check iSCSI service is running using the following command.
systemctl status iscsid
If the status is showing as Inactive
, then you may have to enable and start the iscsid service using the following command.
sudo systemctl enable iscsid && sudo systemctl start iscsid
The following is the expected output.
systemctl status iscsid
● iscsid.service - Open-iSCSI
Loaded: loaded (/usr/lib/systemd/system/iscsid.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-02-19 12:19:08 IST; 2h 37min ago
Docs: man:iscsid(8)
man:iscsiadm(8)
Main PID: 2138 (iscsid)
Tasks: 2
CGroup: /system.slice/iscsid.service
├─2137 /usr/sbin/iscsid
└─2138 /usr/sbin/iscsid
Feb 19 12:19:08 master-1550555590.mayalab.com systemd[1]: Starting Open-iSCSI...
Feb 19 12:19:08 master-1550555590.mayalab.com iscsid[2136]: iSCSI logger with pid=2137 started!
Feb 19 12:19:08 master-1550555590.mayalab.com systemd[1]: Failed to read PID from file /var/run/iscsid.pid: Invalid argument
Feb 19 12:19:08 master-1550555590.mayalab.com systemd[1]: Started Open-iSCSI.
Feb 19 12:19:09 master-1550555590.mayalab.com iscsid[2137]: iSCSI daemon with pid=2138 started!
Install the iSCSI tools
If an iSCSI initiator is not installed on your node, install iscsi-initiator-utils
packages using the following command.
yum install iscsi-initiator-utils -y
You can verify the iSCSI installation from above section.
CentOS
Verify iSCSI services are configured
If an iSCSI initiator is already installed on your node, check that the initiator name is configured using the following commands.
cat /etc/iscsi/initiatorname.iscsi
Check iSCSI service is running using the following command.
systemctl status iscsid
If the status is showing as Inactive
, then you may have to enable and start the iscsid service using the following command.
sudo systemctl enable iscsid && sudo systemctl start iscsid
Install the iSCSI tools
If an iSCSI initiator is not installed on your node, install iscsi-initiator-utils
packages using the following command.
yum install iscsi-initiator-utils -y
You can verify the iSCSI installation from the above section.
Managed Kubernetes Services on Public Cloud
Amazon 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 an iSCSI initiator is already installed on your node, check that the initiator name is configured using the following commands.
cat /etc/iscsi/initiatorname.iscsi
Check the iSCSI service is running using the following command.
systemctl status iscsid
If the status is showing as Inactive
, then you may have to enable and start the iscsid service using the following command.
sudo systemctl enable iscsid && sudo systemctl start iscsid
Install the iSCSI tools
If an iSCSI initiator is not installed on your node, install iscsi-initiator-utils
packages using the following command.
yum install iscsi-initiator-utils -y
You can verify the iSCSI installation from the above section.
For clusters running with the Ubuntu 18.04 AMI
For setting up iSCSI clients on Ubuntu nodes, see the instructions above.
Google Kubernetes Engine (GKE)
GKE Container-Optimized OS does not come with an iSCSI client preinstalled and does not allow installation of an iSCSI client. Therefore, OpenEBS does not work on Kubernetes clusters which are running GKE Container-Optimized OS version of the image 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 above.
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.
ssh azureuser@40.xx.yyy.zzz
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.
sudo docker ps | grep "hyperkube kubelet"
Following is the example output:
3aab0f9a48e2 k8s-gcrio.azureedge.net/hyperkube-amd64:v1.8.7 "/hyperkube kubele..." 48 minutes ago Up 48 minutes eager_einstein
Once kubelet container ID is obtained, you need to get to the shell of this container using the following command.
sudo docker exec -it <container ID> bash
Example:
sudo docker exec -it 3aab0f9a48e2 bash
Check the status of the iSCSI service by using the following command.
service open-iscsi status
Install the 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 to the shell of this container using the following command.
sudo docker exec -it <container ID> bash
Example:
sudo docker exec -it 3aab0f9a48e2 bash
Run the following commands to install and configure iSCSI service in the kubelet.
apt-get update
apt install -y open-iscsi
exit
You can verify the iSCSI installation from the above section.
Kubernetes On-Prem Solutions
Red Hat OpenShift
OpenEBS can be installed using Openshift on the following Operating Systems. Tested OpenShift versions are 3.9 and 3.10.
- On RHEL 7
- On CentOS 7
On RHEL
Latest tested RHEL versions are 7.5, 7.6.
For setting up iSCSI clients on RHEL nodes, see the instructions above.
On CentOS
Latest tested CentOS version is CentOS 7.
For setting up iSCSI clients on CentOS nodes, see the instructions above.
Rancher
- If you are using RancherOS as the operating system for your Kubernetes cluster, you simply need to enable the iSCSI service and start it on all the hosts or nodes.
- If you are using Ubuntu or RHEL as the operating system for your Kubernetes cluster, you need to
- Verify iSCSI initiators are installed on all nodes (and )
- Add the extra_binds under Kubelet service in cluster YAML file to mount the iSCSI binary and configuration inside the
Kubelet
.
iSCSI services On RancherOS
To run iSCSI services, execute the following commands on each of the cluster hosts or nodes.
sudo ros s enable open-iscsi
sudo ros s up open-iscsi
Run the below commands on all the nodes to make sure the below directories are persistent, by default these directories are ephemeral.
ros config set rancher.services.user-volumes.volumes [/home:/home,/opt:/opt,/var/lib/kubelet:/var/lib/kubelet,/etc/kubernetes:/etc/kubernetes,/var/openebs]
system-docker rm all-volumes
reboot
iSCSI services on RHEL or Ubuntu
Step1: Verify iSCSI initiator is installed and services are running
Operating system | iSCSI Package | Commands |
---|---|---|
RHEL / CentOS | iscsi-initiator-utils | yum install iscsi-initiator-utils -y sudo systemctl enable iscsid && sudo systemctl start iscsid modprobe iscsi_tcp |
Ubuntu/Debian | open-iscsi | sudo apt install open-iscsi sudo systemctl enable iscsid && sudo systemctl start iscsid modprobe iscsi_tcp |
Step2: Add extra_binds under kubelet service in cluster YAML
After installing the initiator tool on your nodes, edit the YAML for your cluster, editing the kubelet configuration to mount the iSCSI binary and configuration, as shown in the sample below.
services:
kubelet:
extra_binds:
- "/etc/iscsi:/etc/iscsi"
- "/sbin/iscsiadm:/sbin/iscsiadm"
- "/var/lib/iscsi:/var/lib/iscsi"
- "/lib/modules"
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 RHEL
Latest tested RHEL versions are 7.5, 7.6.
For setting up iSCSI clients on RHEL nodes, see the instructions above.
On Ubuntu
Latest tested Ubuntu version are Ubuntu 16.04 LTS and 18.04 LTS.
For setting up iSCSI clients on Ubuntu nodes, see the instructions above.