Skip to content

Latest commit

 

History

History
90 lines (61 loc) · 3.98 KB

README.md

File metadata and controls

90 lines (61 loc) · 3.98 KB

Using OpenEBS with K8s

The artifacts in this repository contain unreleased changes.

If you are looking at deploying from a stable release, please follow the instructions at Quick Start Guide

If this is your first time to Kubernetes, please go through these introductory tutorials:

Usage

Installing Pre-released OpenEBS (at your own risk)

kubectl apply -f openebs-operator.yaml

(Optional) Enable monitoring using prometheus and grafana

Use this step if you don't already have monitoring services installed on your k8s cluster.

kubectl apply -f openebs-monitoring-pg.yaml

You can also obtain Kubernetes resource metrics via the following step:

kubectl apply -f openebs-kube-state-metrics.yaml

This folder also contains a set of dashboards that can be imported into your grafana:

(Optional) Enable monitoring using Prometheus Operator

It is assumed that you have prometheus operator already deployed and working fine. If not done already follow instructions to do it here.

While deploying above chart make sure the values of specified field are as follows:

    serviceMonitorSelectorNilUsesHelmValues: false
    serviceMonitorSelector: {}
    serviceMonitorNamespaceSelector: {}

This makes sure that all the ServiceMonitor objects from all namespaces we create further will be selected.

Now to monitor openebs related resources create following ServiceMonitor object in openebs namespace. See openebs-servicemonitor.yaml file.

kubectl -n openebs apply -f openebs-servicemonitor.yaml

Find docs here to read about other fields in ServiceMonitor object.

Now once this config is picked up by prometheus operator it will start scraping the metrics and you can start seeing them in prometheus dashboard. The metrics relevant to openebs are conveniently prefixed with openebs* or latest_openebs*.

(Optional) Enable alerting using prometheus alert manager

If you would like to receive alerts for specific Node, Kubernetes & OpenEBS conditions, setup the alert-manager:

kubectl apply -f openebs-alertmanager.yaml

NOTE: The alert rules are currently placed into the prometheus configmag in openebs-monitoring-pg.yaml.

(Optional) Setup Log collection using grafana loki

Use the following step (requires setup of helm client & tiller server on the server) to setup grafana loki stack on the cluster. On the grafana console, select loki as the datasource and provide the appropriate URL (typically http://loki:3100) to visualize logs.

helm repo add loki https://grafana.github.io/loki/charts
helm repo update
helm upgrade --install loki --namespace=openebs loki/loki-stack

NOTE: A sample template specification of the components in the loki stack can be found here obtained as part of helm --debug --dry-run command.