Following are the steps to get started with OpenEBS on a Kubernetes cluster.
As a Kubernetes Operator/Administrator:
As a prerequisite, check if open-iscsi is installed and running on kubelet. See Steps for configuring and verifying open-iscsi.
Note: Do not install open-iscsi / iscsi-initiator-utils on host nodes if a kubelet container, for example, Rancher Container Engine (RKE) already has the package installed. See Troubleshooting section for detailed information.
Kubernetes 1.9.7+ installed
kubectl or helm installed and ready to use. Ensure that you run the kubectl commands with cluster admin context.
You can install OpenEBS either through stable helm chart or by using OpenEBS operator/kubectl.
If you are using CentOS as base OS for 0.8 OpenEBS installation, then you must disable selinux for OpenEBS Node Disk Manager to detect the OS disk. You can disable selinux by using the
Using a Stable Helm Chart
Setup RBAC for helm tiller and install the chart from Kubernetes stable helm repo using the following commands.
helm repo update helm install --namespace openebs --name openebs stable/openebs
This will install OpenEBS cluster in openebs namespace. For more details on installing OpenEBS using helm, see install through helm.
You can also install OpenEBS in custom namespace using the following way.
helm repo update helm install --namespace <custom_namespace> --name openebs stable/openebs
Once you install OpenEBS in custom namespace, all the OpenEBS components will be deployed under the same namespace.
Using OpenEBS Operator (kubectl):
You can install OpenEBS cluster by running the following command.
Note: Ensure that you have met the prerequisites before installation.
kubectl apply -f https://openebs.github.io/charts/openebs-operator-0.8.0.yaml
The installation will involve creating a new Service Account and assigning it to OpenEBS components.
For detailed information about installing OpenEBS cluster, see install using kubectl
Optional: Create a catalog of storage classes and publish them to your developers. Two default storage classes (openebs-jiva-default and openebs-cstor-sparse) are added to the cluster when you install OpenEBS.
Optional: An OpenEBS enabled cluster can be imported into mayaonline.io for better visibility, volume management, and integrated ChatOps experience with Slack.
As an Application Developer:
Create a PVC specification with the right pvc name and use it in the application YAML file. Some sample application yaml files are available under openebs-repository.
Apply the yaml file using
kubectl apply -fcommand. Verify that an OpenEBS volume is provisioned and bound to the application pod.
Note: Because OpenEBS is a CAS, you will observe that new pods (one volume controller pod and as many volume replica PODs as the number of replicas configured in the storage class) are created.