Back to articles
Thanos Has a Free API — Scale Prometheus to Multi-Cluster with Unlimited Retention
How-ToDevOps

Thanos Has a Free API — Scale Prometheus to Multi-Cluster with Unlimited Retention

via Dev.to DevOpsAlex Spinov

Thanos extends Prometheus with long-term storage, global querying, and high availability . It provides a single Prometheus-compatible API that queries across multiple Prometheus instances and object storage. Free, open source, CNCF incubating project. Used by companies like Adobe, eBay, and Improbable. Why Use Thanos? Unlimited retention — store metrics in S3/GCS for years, not weeks Global query — single API queries across all Prometheus instances High availability — deduplicate metrics from HA Prometheus pairs Downsampling — automatic 5m and 1h resolution for old data 100% Prometheus-compatible — same PromQL, same API Quick Setup 1. Install Thanos Sidecar # Add sidecar to existing Prometheus helm upgrade prometheus prometheus-community/prometheus \ --set server.extraFlags[0] = '--storage.tsdb.min-block-duration=2h' \ --set server.extraFlags[1] = '--storage.tsdb.max-block-duration=2h' # Deploy Thanos sidecar kubectl apply -f - << EOF apiVersion: apps/v1 kind: Deployment metadata: name

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
3 views

Related Articles