Deploying GreptimeDB Observability Databases on Kubernetes

Introduction
Modern, cloud-native services emit a constant torrent of metrics, logs and traces. A Kubernetes cluster can easily reach millions of time-series per minute, creating two urgent needs:
- a database that can ingest high-cardinality time-series data without breaking the bank, and
- an orchestration layer that offers seamless scaling, rolling upgrades and self-healing.
GreptimeDB—a Rust-based, high-performance, open-source time-series database—ticks the first box; deploying it on Kubernetes ticks the second. Together, they form a cost-effective alternative to Thanos + Prometheus or Elastic + Fluentd for cloud-native observability.
Why Kubernetes + GreptimeDB?
| Benefit | Detail |
|---|---|
| Elastic scale-out | Add or remove Frontend or Datanode pods in seconds; StatefulSets handle stable network IDs. |
| Declarative ops | The GreptimeDB Operator encodes best practices for upgrades, sharding and backups. |
| Self-monitoring | Vector sidecars forward GreptimeDB’s own logs and metrics back into a dedicated table—no extra Loki stack required. |
| SQL + PromQL | Keep Grafana dashboards (PromQL) while data engineers use ANSI-SQL for ad-hoc forensics. |
Architecture Overview
graph TD
subgraph k8s Cluster
RW[Write Frontend] --> DN[Datanode]
RO[Read Frontend] --> DN
DN -->|Parquet| S3[(S3/MinIO)]
DN -->|Metrics & Logs| GT[GreptimeDB-Mon]
end
style S3 fill:#fefefe,stroke:#888- Write Frontend – gRPC/HTTP ingest with millisecond-level back-pressure.
- Read Frontend – stateless pods that fan out SQL/PromQL to Datanodes.
- Datanode – columnar engine; stores immutable Parquet blocks directly on S3 or any object storage.
- GreptimeDB-Mon – tiny monitoring instance automatically provisioned by the Operator.
Quick Installation (Helm)
helm repo add greptime https://greptimeteam.github.io/helm-charts
helm install greptime greptime/greptimedb-cluster \
--set storage.s3.bucket=obs-demo \
--set monitoring.enabled=true \
--set frontends[0].name=write \
--set frontends[1].name=readOne command, and you get: read/write separation, object-storage tiering, Vector sidecars, and Grafana dashboards.
Data-Modeling Best Practices for Kubernetes Workloads
CREATE TABLE k8s_container_metrics (
namespace STRING,
pod STRING,
container STRING,
cpu_usage DOUBLE,
memory_mb DOUBLE,
ts TIMESTAMP TIME INDEX,
PRIMARY KEY (namespace, pod, container)
) WITH (
'merge_mode' = 'last_non_null'
);Tips
- Keep ≤ 5 low-cardinality columns in the primary key (
namespace,pod,container). - Move high-cardinality fields (
trace_id,request_id) out of the key and add a SKIPPING INDEX to preserve query speed. - Partition large multi-tenant clusters by
namespaceortenant_idto guarantee even shard distribution.
Day-2 Operations
| Task | How it works |
|---|---|
| Autoscaling | Bump values.yaml: frontends[x].replicas — no data migration needed. |
| Rolling upgrades | helm upgrade triggers staged pod restarts; the Operator handles schema migrations. |
| Retention + Downsampling | CREATE FLOW tasks aggregate 1 s samples to 1 min; apply TTL for cold data on Glacier. |
| Prometheus long-term storage | Point remote_write at the write frontend; GreptimeDB stores months of data in cheap object storage while still serving PromQL. |
Conclusion
By combining Kubernetes orchestration with GreptimeDB’s unified observability platform, teams gain a scalable, resilient, and cost-efficient foundation for real-time analytics. Whether you need Prometheus long-term storage, high-cardinality troubleshooting, or end-to-end SQL visibility, GreptimeDB on Kubernetes delivers a single, powerful solution for cloud-native observability.
About Greptime
GreptimeDB is an open-source, cloud-native database purpose-built for real-time observability. Built in Rust and optimized for cloud-native environments, it provides unified storage and processing for metrics, logs, and traces—delivering sub-second insights from edge to cloud —at any scale.
GreptimeDB OSS – The open-sourced database for small to medium-scale observability and IoT use cases, ideal for personal projects or dev/test environments.
GreptimeDB Enterprise – A robust observability database with enhanced security, high availability, and enterprise-grade support.
GreptimeCloud – A fully managed, serverless DBaaS with elastic scaling and zero operational overhead. Built for teams that need speed, flexibility, and ease of use out of the box.
🚀 We’re open to contributors—get started with issues labeled good first issue and connect with our community.
Stay in the loop
Join our community
Get the latest updates and discuss with other users.
