Kubernetes Probes for Prometheus Monitoring of Its State
FleetingDon’t use kubernetes/metrics1, use kube-state-metrics.
There exists an out of the shelf solution called kube-prometheus, that installs grafana, prometheus and kube-state-metrics. It might be tempting to use it with only kube-state-metrics enabled (because grafana and prometheus are already setup in my case), but, to the best of my understanding, it requires some knowledge about jsonnet. For the time being, my jsonnet-noob eye feels lost in all those configurations.
some ideas of alert to setup
- https://medium.com/@muppedaanvesh/a-hands-on-guide-setting-up-prometheus-and-alertmanager-in-kubernetes-with-custom-alerts-%EF%B8%8F-f9c6d37b27ca they install kube-prometheus-stack
Some interesting ones from prometheus-operator/kube-prometheus: Use Prometheus to monitor Kubernetes and applications running on Kubernetes:
- https://github.com/prometheus-operator/kube-prometheus/blob/main/manifests/kubePrometheus-prometheusRule.yaml
- https://github.com/prometheus-operator/kube-prometheus/blob/main/manifests/kubernetesControlPlane-prometheusRule.yaml
- https://learn.microsoft.com/en-us/azure/azure-monitor/containers/kubernetes-metric-alerts
- https://www.zupzup.org/prometheus-alert-examples/index.html
- https://openobserve.ai/articles/kubernetes-prometheus-metrics-monitoring/
- https://last9.io/docs/ingest-kubernetes-metrics-via-prometheus/
- https://www.vrchr.fr/posts/2024/2024-01-09-kube-state-metrics-vpa/
Permalink
-
Metrics Server is meant only for autoscaling purposes. For example, don’t use it to forward metrics to monitoring solutions, or as a source of monitoring solution metrics. In such cases please collect metrics from Kubelet /metrics/resource endpoint directly.