From b2ec668ef753295d458c4b322f065c575e5d837c Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 16 Feb 2018 00:08:41 -0500 Subject: [PATCH] Added info on monitoring --- README.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fda12d1..ae613c8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ - +**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [ansible-rpi-k8s-cluster](#ansible-rpi-k8s-cluster) - [Background](#background) @@ -48,6 +48,9 @@ - [GlusterFS](#glusterfs) - [Deploying GlusterFS In Kubernetes](#deploying-glusterfs-in-kubernetes) - [Using GlusterFS In Kubernetes Pod](#using-glusterfs-in-kubernetes-pod) + - [Monitoring](#monitoring) + - [Heapster](#heapster) + - [InfluxDB/Grafana](#influxdbgrafana) - [Resetting The Kubernetes Cluster](#resetting-the-kubernetes-cluster) - [License](#license) - [Author Information](#author-information) @@ -808,6 +811,58 @@ spec: readOnly: false ``` +## Monitoring + +We have included a few deployments to get some monitoring of your environment +going as well. These include [Heapster](https://github.com/kubernetes/heapster), +[InfluxDB](https://www.influxdata.com/time-series-platform/influxdb/), and +[Grafana](https://grafana.com/). + +### Heapster + +In order to get cluster metrics into InfluxDB and Grafana we must first deploy +Heapster. Heapster enables container monitoring and performance analysis for +Kubernetes. +To deploy Heapster simply run the following: + +```bash +kubectl apply -f deployments/heapster.yaml +... +clusterrolebinding "heapster" created +serviceaccount "heapster" created +deployment "heapster" created +service "heapster" created +``` + +### InfluxDB/Grafana + +After deploying [Heapster](#heapster) we are now ready to deploy InfluxDB and +Grafana. + +> NOTE: The current deployment of InfluxDB/Grafana depends on [GlusterFS](#glusterfs) +> being deployed. So if that has not been deployed yet you will either need to or +> adjust the `influx-grafana.yaml` deployment to adjust for the volumes. Also +> [Traefik](#deploying-traefik) for load balancing is required to properly connect +> to Grafana's WebUI. + +```bash +kubectl apply -f deployments/influx-grafana.yaml +... +deployment "monitoring-grafana" created +service "monitoring-grafana" created +deployment "monitoring-influxdb" created +service "monitoring-influxdb" created +ingress "monitoring-grafana" created +``` + +After the deployment above has been successful you should be able to connect to +the Grafana WebUI at `http://wirelessIP/grafana`. + +![Grafana WebUI](images/2018/02/grafana-webui.png) + +And from the screenshot above you will notice that two dashboards +(`cluster` and `pods`) are already pre-loaded during deployment. + ## Resetting The Kubernetes Cluster If for any reason you would like to reset the Kubernetes cluster. You can easily