Table of Contents

Kube-prometheus

Kube-prometheus is a curated collection of Kubernetes manifests, Grafana dashboards, and Prometheus rules designed to provide a comprehensive and production-ready monitoring solution for Kubernetes clusters. It leverages the power of Prometheus, the leading open-source monitoring and alerting toolkit, and Grafana, a popular visualization and dashboarding platform, to deliver a holistic view of your cluster's health and performance.

Key Features

Benefits

Code Examples

While Kube-prometheus focuses on Kubernetes manifests and configurations, here's a simplified example of a Prometheus alert rule included in the project:

```yaml groups: - name: kubernetes-apps

 rules:
 - alert: KubeDeploymentReplicasMismatch
   expr: kube_deployment_status_replicas_available != kube_deployment_spec_replicas
   for: 10m
   labels:
     severity: warning
   annotations:
     summary: "Deployment replicas mismatch ({{ $labels.namespace }}/{{ $labels.deployment }})"
     description: "{{ $labels.deployment }} in namespace {{ $labels.namespace }} has not matched the expected number of replicas for longer than 15 minutes."
```

This rule triggers an alert when the number of available replicas in a deployment doesn't match the desired number of replicas for more than 15 minutes.

Additional Resources