Prometheus HA with Thanos
In this example, I will walk through the steps required to configure Kube-prometheus-stack with Thanos for High availability.
[!NOTE] Work in progress.
High level tasks
- Configure Thanos sidecar along with Prometheus
- Prometheus must have storage configured
- S3 bucket for Thanos to upload metrics to
- IAM Pod Identity for Kubernetes pod with write access to S3
- Install and configure Thanos ruler, querier, and gateway
- Configure Grafana data source for Thanos
Thanos components
| Component | Purpose |
|---|---|
| ✅ Query | Aggregates metrics from Prometheus sidecars and StoreGateway |
| ✅ StoreGateway | Reads historical blocks from S3 |
| ✅ Compactor | Deduplicates and compacts blocks in S3 |
| ⚙️ Optional: Ruler | Allows rule evaluation based on S3 data |
| ⚙️ Optional: Query Frontend | Adds caching, better UI performance |
| ❌ Bucketweb | Usually not needed in production |