This repository contains the setup for monitoring and alerting in a MicroK8s kubernetes cluster.
- node-level metrics
- pod-level metrics
- pod logs
- node-level logs ( dmesg, /var/log/messages, syslog )
- send alerts via email using Prometheus Alertmanager.
- Node Exporters: for collecting node-level metrics
- Promtail-Loki: for collecting pod logs and node-level logs
- Prometheus: for collecting and storing metrics
- Alertmanager: for sending alerts via email
This setup uses hostPath-based storage for observability, which can be changed according to your use case (If you decided not to go for hostpath based storage).
This setup uses Loki (single binary/monolithic) for log collection and storage. Other options like Loki-scalable are available but not covered in this setup.
This setup uses MicroK8s as the Kubernetes distribution.
- Prometheus UI
- Grafana
- AlertManager
- Promtail
Access All components are exposed using NodePort for externally public access. The format for accessing each component in my case is Public_ip_of_kmaster:NodePort
.
Linkedin : https://www.linkedin.com/in/vishal-kapadi/
Github : https://github.com/vishalk17
My Github DevOps Repo: https://github.com/vishalk17/devops/
Youtube : https://www.youtube.com/@vishalk17
Telegram : http://t.me/vishalk17
Telegram Channel : https://t.me/vishalk17_devops