rpi.carlosedp.cluster-monit.../Readme.md

146 lines
5.3 KiB
Markdown
Raw Normal View History

2019-02-05 20:41:01 +01:00
# Prometheus Operator for ARM / X86-64 platforms
2018-03-02 01:03:53 +01:00
The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.
2019-02-05 20:41:01 +01:00
This have been tested on a hybrid ARM64 / X84-64 Kubernetes cluster deployed as [this article](https://medium.com/@carlosedp/building-a-hybrid-x86-64-and-arm-kubernetes-cluster-e7f94ff6e51d).
2018-03-02 01:03:53 +01:00
2019-02-05 20:41:01 +01:00
This repository collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
2018-03-02 01:03:53 +01:00
2019-02-05 20:41:01 +01:00
The content of this project is written in jsonnet and is an extension of the fantastic [kube-prometheus](https://github.com/coreos/prometheus-operator/blob/master/contrib/kube-prometheus) project.
2018-03-02 01:03:53 +01:00
2019-02-05 20:41:01 +01:00
Components included in this package:
2018-03-02 01:03:53 +01:00
2019-02-05 20:41:01 +01:00
* The Prometheus Operator
* Highly available Prometheus
* Highly available Alertmanager
* Prometheus node-exporter
* ARM_exporter to generate temperature metrics
* MetalLB metrics
* Traefik metrics
* kube-state-metrics
* Grafana
2018-05-29 19:33:05 +02:00
2019-02-05 20:41:01 +01:00
## Quickstart
The repository already provides a set of compiled manifests to be applied into the cluster. The deployment can be customized thru the jsonnet files.
To simply deploy the stack, run:
2018-05-29 19:33:05 +02:00
```
2019-02-05 20:41:01 +01:00
$ kubectl apply -f manifests/
2018-03-02 01:03:53 +01:00
2019-02-05 20:41:01 +01:00
# It can take a few seconds for the above 'create manifests' command to fully create the following resources, so verify the resources are ready before proceeding.
$ until kubectl get customresourcedefinitions servicemonitors.monitoring.coreos.com ; do date; sleep 1; echo ""; done
$ until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
2018-03-02 01:03:53 +01:00
2019-02-05 20:41:01 +01:00
$ kubectl apply -f manifests/ # This command sometimes may need to be done twice (to workaround a race condition).
```
## Customizing
The content of this project consists of a set of jsonnet files making up a library to be consumed.
### Pre-reqs
The project requires json-bundler and the jsonnet compiler. The Makefile does the heavy-lifting of installing:
```
git clone https://github.com/carlosedp/prometheus-operator-ARM
cd prometheus-operator-ARM
make vendor
# Change the jsonnet files...
make
```
After this, a new customized set of manifests is built into the `manifests` dir. To apply to your cluster, run:
```
make deploy
```
To uninstall, run:
```
make teardown
2018-05-29 19:33:05 +02:00
```
## Images
This project depends on the following images:
**Alertmanager**
**Blackbox_exporter**
**Node_exporter**
**Snmp_exporter**
**Prometheus**
* Source: https://github.com/carlosedp/prometheus-ARM
* Autobuild: https://travis-ci.org/carlosedp/prometheus-ARM
* Images:
* https://hub.docker.com/r/carlosedp/prometheus/
* https://hub.docker.com/r/carlosedp/alertmanager/
* https://hub.docker.com/r/carlosedp/blackbox_exporter/
* https://hub.docker.com/r/carlosedp/node_exporter/
* https://hub.docker.com/r/carlosedp/snmp_exporter/
**ARM_exporter**
* Source: https://github.com/carlosedp/docker-arm_exporter
* Autobuild: https://travis-ci.org/carlosedp/docker-arm_exporter
* Images: https://hub.docker.com/r/carlosedp/arm_exporter/
**Prometheus-operator**
* Source: https://github.com/carlosedp/prometheus-operator
2018-06-11 17:31:49 +02:00
* Autobuild: No autobuild yet. Use provided `build_images.sh` script.
2018-05-29 19:33:05 +02:00
* Images: https://hub.docker.com/r/carlosedp/prometheus-operator
2019-02-05 20:41:01 +01:00
**Prometheus-adapter**
* Source: https://github.com/DirectXMan12/k8s-prometheus-adapter
* Autobuild: No autobuild yet. Use provided `build_images.sh` script.
* Images: https://hub.docker.com/r/carlosedp/k8s-prometheus-adapter
2018-05-29 19:33:05 +02:00
**Grafana**
* Source: https://github.com/carlosedp/grafana-ARM
* Autobuild: https://travis-ci.org/carlosedp/grafana-ARM
2019-02-05 20:41:01 +01:00
* Images: https://hub.docker.com/r/grafana/grafana/
2018-05-29 19:33:05 +02:00
**Kube-state-metrics**
* Source: https://github.com/kubernetes/kube-state-metrics
2018-06-11 17:31:49 +02:00
* Autobuild: No autobuild yet. Use provided `build_images.sh` script.
2018-05-29 19:33:05 +02:00
* Images: https://hub.docker.com/r/carlosedp/kube-state-metrics
**Addon-resizer**
2019-02-05 20:41:01 +01:00
* Source: https://github.com/kubernetes/autoscaler/tree/master/addon-resizer
2018-06-11 17:31:49 +02:00
* Autobuild: No autobuild yet. Use provided `build_images.sh` script.
2018-05-29 19:33:05 +02:00
* Images: https://hub.docker.com/r/carlosedp/addon-resizer
*Obs.* This image is a clone of [ARM64](https://console.cloud.google.com/gcr/images/google-containers/GLOBAL/addon-resizer-arm64) and [ARM](https://console.cloud.google.com/gcr/images/google-containers/GLOBAL/addon-resizer-arm64) with a manifest. It's cloned and generated by the `build_images.sh` script
**configmap_reload**
* Source: https://github.com/carlosedp/configmap-reload
* Autobuild: https://travis-ci.org/carlosedp/configmap-reload
* Images: https://hub.docker.com/r/carlosedp/configmap-reload
2018-03-02 01:03:53 +01:00
2018-06-11 17:31:49 +02:00
**prometheus-config-reloader**
* Source: https://github.com/coreos/prometheus-operator/tree/master/contrib/prometheus-config-reloader
* Autobuild: No autobuild yet. Use provided `build_images.sh` script.
* Images: https://hub.docker.com/r/carlosedp/prometheus-config-reloader
2018-05-29 19:33:05 +02:00
**SMTP-server**
2018-03-02 01:03:53 +01:00
2018-05-29 19:33:05 +02:00
Source: https://github.com/carlosedp/docker-smtp
Autobuild: https://travis-ci.org/carlosedp/docker-smtp
Images: https://hub.docker.com/r/carlosedp/docker-smtp
2019-02-05 20:41:01 +01:00
**Kube-rbac-proxy**
Source: https://github.com/brancz/kube-rbac-proxy
Autobuild: No autobuild yet. Use provided `build_images.sh` script.
Images: https://hub.docker.com/r/carlosedp/kube-rbac-proxy