欢迎参与 8 月 1 日中午 11 点的线上分享,了解 GreptimeDB 联合处理指标和日志的最新方案! 👉🏻 点击加入

Skip to content

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:

  1. a database that can ingest high-cardinality time-series data without breaking the bank, and
  2. 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?

BenefitDetail
Elastic scale-outAdd or remove Frontend or Datanode pods in seconds; StatefulSets handle stable network IDs.
Declarative opsThe GreptimeDB Operator encodes best practices for upgrades, sharding and backups.
Self-monitoringVector sidecars forward GreptimeDB’s own logs and metrics back into a dedicated table—no extra Loki stack required.
SQL + PromQLKeep Grafana dashboards (PromQL) while data engineers use ANSI-SQL for ad-hoc forensics.

Architecture Overview

mermaid
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)

bash
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=read

One command, and you get: read/write separation, object-storage tiering, Vector sidecars, and Grafana dashboards.


Data-Modeling Best Practices for Kubernetes Workloads

sql
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 namespace or tenant_id to guarantee even shard distribution.

Day-2 Operations

TaskHow it works
AutoscalingBump values.yaml: frontends[x].replicas — no data migration needed.
Rolling upgradeshelm upgrade triggers staged pod restarts; the Operator handles schema migrations.
Retention + DownsamplingCREATE FLOW tasks aggregate 1 s samples to 1 min; apply TTL for cold data on Glacier.
Prometheus long-term storagePoint 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.

GitHub | 🌐 Website | 📚 Docs

💬 Slack | 🐦 Twitter | 💼 LinkedIn

加入我们的社区

获取 Greptime 最新更新,并与其他用户讨论。