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.
Kubernetes 1.9.7+ is installed
You can install OpenEBS either through stable helm chart or OpenEBS helm chart or by using OpenEBS operator/kubectl.
Using a Stable Helm Chart:
Setup RBAC for helm tiller and install the chart from Kubernetes stable and deploy the storage class templates.
helm repo update helm install --namespace openebs --name openebs stable/openebs kubectl apply -f https://raw.githubusercontent.com/openebs/openebs/v0.7/k8s/openebs-storageclasses.yaml
For more details on installing OpenEBS using helm, see install through helm.
Using OpenEBS Helm Charts
helm repo add openebs-charts https://openebs.github.io/charts/ helm repo update helm install openebs-charts/openebs
Using OpenEBS Operator (kubectl):
Ensure that you run the
kubectlcommands with cluster admin context. The installation will involve creating a new Service Account and assigning to OpenEBS components.
For installing OpenEBS cluster, see installation
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.