f36e3d9399
* new-operator: (30 commits) Updated readme Update SMTP image version Cleanup after merging addon-resizer PR to upstream. Update libs Updated README Tag arm_exporter to arm64 only nodes Fix arm-exporter proxy listen port Update Grafana dashboard Add CoreDNS dashboard Cleanup Add Grafana persistence Updated dashboard alert Added anti-affinity to Prometheus and alertmanager Remove example file Generate all manifests Import all jsonnet files Added new config to the config generator. Import Grafana dashboards Added MetalLB ServiceMonitor Fix Traefik monitor Add SMTP relay for Gmail Update libs ... |
||
---|---|---|
grafana-dashboards | ||
manifests | ||
manifests-old | ||
.gitignore | ||
arm_exporter.jsonnet | ||
build_images.sh | ||
build.sh | ||
create_gmail_auth.sh | ||
generate_ingress_auth.sh | ||
image_sources_versions.jsonnet | ||
jsonnetfile.json | ||
jsonnetfile.lock.json | ||
main.jsonnet | ||
Makefile | ||
metallb.jsonnet | ||
operator_stack.jsonnet | ||
Readme.md | ||
smtp_server.jsonnet | ||
traefik.jsonnet |
Prometheus Operator for ARM / X86-64 platforms
The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.
This have been tested on a hybrid ARM64 / X84-64 Kubernetes cluster deployed as this article.
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.
The content of this project is written in jsonnet and is an extension of the fantastic kube-prometheus project.
To continue using my previous stack with manifests and previous versions of the operator and components, use the legacy repo tag from: https://github.com/carlosedp/prometheus-operator-ARM/tree/legacy.
Components included in this package:
- 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
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:
$ kubectl apply -f manifests/
# 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
$ 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
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:
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
- Autobuild: No autobuild yet. Use provided
build_images.sh
script. - Images: https://hub.docker.com/r/carlosedp/prometheus-operator
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
Grafana
- Source: https://github.com/carlosedp/grafana-ARM
- Autobuild: https://travis-ci.org/carlosedp/grafana-ARM
- Images: https://hub.docker.com/r/grafana/grafana/
Kube-state-metrics
- Source: https://github.com/kubernetes/kube-state-metrics
- Autobuild: No autobuild yet. Use provided
build_images.sh
script. - Images: https://hub.docker.com/r/carlosedp/kube-state-metrics
Addon-resizer
- Source: https://github.com/kubernetes/autoscaler/tree/master/addon-resizer
- Autobuild: No autobuild yet. Use provided
build_images.sh
script. - Images: https://hub.docker.com/r/carlosedp/addon-resizer
Obs. This image is a clone of ARM64 and ARM 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
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
SMTP-server
Source: https://github.com/carlosedp/docker-smtp Autobuild: https://travis-ci.org/carlosedp/docker-smtp Images: https://hub.docker.com/r/carlosedp/docker-smtp
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