Posted in DevOps & Observability

Kubernetes & Container Observability Explained: Prometheus, Grafana, and OpenTelemetry

A Kubernetes cluster can run hundreds of pods across dozens of nodes, and any one of them can fail, get rescheduled, or quietly start leaking memory without a human noticing — unless the cluster is instrumented to say so. Three open-source, CNCF-hosted projects have become the default stack for doing that: Prometheus collects and stores metrics, Grafana visualizes them (and other signals) on dashboards, and OpenTelemetry standardizes how applications emit metrics, logs, and traces in the first place. They are not competitors — each covers a different layer of the same job — and understanding how they fit together is the real question for anyone running containerized workloads in 2026.

At a Glance

ToolBest ForDeployment ModelKey CapabilitiesNotable Integrations
PrometheusCollecting and storing numeric time-series metrics from dynamic, container-based infrastructureSelf-hosted server (single binary, commonly run as a Kubernetes deployment); each server is autonomous and doesn’t depend on distributed storagePull-based (HTTP) scraping, Kubernetes-aware service discovery, a multi-dimensional label-based data model, PromQL query language, local time-series storage, rule evaluationAlertmanager for routing alerts; a large exporter ecosystem (node_exporter, kube-state-metrics, and more); Grafana as the standard visualization layer
GrafanaVisualizing metrics, logs, and traces from one or more backends in a single set of dashboardsSelf-hosted (including on Kubernetes) or Grafana Cloud (hosted)Dashboards, ad hoc exploration (Explore), alert rules, cross-signal links (e.g., trace-to-logs), annotation supportPrometheus and Loki as core data sources, Tempo for traces, Jaeger and Zipkin support, Pyroscope for profiles, plus SQL databases, Elasticsearch, and cloud-monitoring plugins
OpenTelemetryInstrumenting applications once and emitting vendor-neutral telemetry (traces, metrics, logs) to any compatible backendSDKs embedded in application code, plus an optional Collector deployed as a Kubernetes DaemonSet (per-node agent), Deployment (central gateway), or sidecarVendor-neutral instrumentation APIs/SDKs, the OTLP wire protocol, a Collector with pluggable receivers/processors/exporters, Kubernetes-specific receivers (kubeletstats, Kubernetes Cluster, Kubernetes Objects) and a Kubernetes Attributes processor that tags telemetry with pod/namespace metadataExports to Prometheus (metrics), and to most major observability backends via OTLP; not an observability backend itself

Short Verdict

These three tools aren’t alternatives to each other — they’re the three pieces most Kubernetes observability stacks assemble, in roughly this order: OpenTelemetry (or a simpler client library) instruments applications and infrastructure components and gets telemetry out in a standard format, Prometheus scrapes and stores the metrics half of that telemetry, and Grafana sits on top to turn stored metrics (and logs, traces, and profiles from other backends) into dashboards a human can read during an incident. The practical question for most teams isn’t “which one should I pick” but “how much of this do I want to run myself versus buy as a managed service” — and the fact that all three speak open, documented protocols (PromQL-compatible metrics, OTLP) means that choice doesn’t lock you in either direction.

What It Is

Prometheus is, in its own documentation’s words, “an open-source systems monitoring and alerting toolkit.” It stores data as time series — a value plus a timestamp — identified by a metric name and a set of key/value labels, which Prometheus describes as a multi-dimensional data model. It became the Cloud Native Computing Foundation’s second hosted project in 2016, right after Kubernetes itself.

Grafana is a visualization and dashboarding layer, not a storage system. Per Grafana Labs’ own documentation, a “data source” is a connection to a storage backend that holds your data, and Grafana queries those sources to build dashboards, run ad hoc queries, and define alert rules — it doesn’t hold the underlying telemetry itself (aside from its own metadata, like annotations and alert state).

OpenTelemetry describes itself as an open-source observability framework and toolkit whose goal is making it easy to instrument applications and systems in any language, infrastructure, or runtime — and it is explicitly vendor- and tool-agnostic. It formed from a merger of two earlier projects, OpenTracing and OpenCensus, to fix the lack of a single standard for how code reports telemetry. Critically, OpenTelemetry’s own documentation is direct about what it isn’t: “it is not an observability backend.” Storage and visualization are left to tools like Prometheus and Grafana.

How It Works / Key Features

Prometheus works on a pull model: rather than waiting for applications to push metrics to it, the Prometheus server scrapes metrics over HTTP from targets it discovers via Kubernetes-aware service discovery or static configuration (short-lived jobs that can’t be scraped directly can push through a separate Pushgateway instead). In a Kubernetes cluster, two companion projects fill out what Prometheus itself doesn’t expose: kube-state-metrics, a Kubernetes SIG Instrumentation project, listens to the API server and generates metrics about the state of objects — deployments, pods, nodes — as distinct from a node or container’s resource usage, and cAdvisor/node-level exporters cover the resource-usage side. Once scraped, data is queried with PromQL, and rule files can evaluate expressions continuously to either record new derived series or fire alerts, which are handed off to Alertmanager for deduplication, grouping, and routing. Prometheus is explicit that its model favors availability over perfect accuracy — its own documentation says it isn’t a good fit for use cases requiring 100% accuracy, like per-request billing, but is well suited to dynamic, service-oriented architectures that need to stay observable during outages.

Grafana connects to Prometheus and other backends as “core” data sources — Prometheus for metrics, Loki for logs, and Tempo for traces are named as first-class integrations in Grafana’s own documentation, alongside support for Jaeger, Zipkin, Pyroscope (profiles), and many other databases and cloud-monitoring plugins. Dashboards built on top of these sources can mix panels from multiple backends, and Grafana supports jumping between correlated signals — for example, moving from a trace span to the logs emitted during that same request. Grafana Cloud, the hosted option, ships with Prometheus-, Loki-, and Tempo-compatible endpoints preconfigured so teams don’t have to run those backends themselves.

OpenTelemetry has two main parts that matter for Kubernetes: the language SDKs/instrumentation libraries that applications use to emit traces, metrics, and logs, and the optional OpenTelemetry Collector, which receives, processes, and re-exports that telemetry. In Kubernetes, the Collector is commonly deployed as a DaemonSet (one agent per node, well suited to picking up node- and pod-level signals) or as a central Deployment acting as a gateway, with a sidecar pattern also documented. Its component model is built from receivers, processors, and exporters: Kubernetes-specific receivers include kubeletstats (node/pod/container metrics from the kubelet), the Kubernetes Cluster receiver (cluster-level metrics and entity events), and the Kubernetes Objects receiver (events and objects from the API server), while the Filelog receiver picks up container stdout/stderr logs and the OTLP receiver is the recommended path for telemetry coming directly from instrumented applications. A Kubernetes Attributes processor then stamps that telemetry with pod, namespace, and other metadata so it can be filtered and correlated later. All of this travels using OTLP, the protocol OpenTelemetry defines for telemetry data, and a Collector can export Prometheus-formatted metrics onward to a Prometheus server or any OTLP-compatible backend — which is the usual seam where OpenTelemetry hands metrics off to Prometheus and Grafana for storage and visualization.

A minimal OpenTelemetry Collector configuration that scrapes a Kubernetes pod’s metrics and forwards them to Prometheus looks like this:

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: 'otel-collector'
          scrape_interval: 15s
          static_configs:
            - targets: ['localhost:8888']

processors:
  k8sattributes: {}
  batch: {}

exporters:
  prometheusremotewrite:
    endpoint: "http://prometheus-server.monitoring.svc:9090/api/v1/write"

service:
  pipelines:
    metrics:
      receivers: [prometheus]
      processors: [k8sattributes, batch]
      exporters: [prometheusremotewrite]

This is a simplified, illustrative example rather than a copy-paste production manifest — the k8sattributes processor and prometheusremotewrite exporter are real OpenTelemetry Collector components, but a working deployment also needs RBAC permissions, a Kubernetes Deployment or DaemonSet spec, and the matching sidecar or node-level wiring described above.

Pros

  • Prometheus — purpose-built for Kubernetes-style dynamic infrastructure, with no external dependency for each server to keep working, and a mature exporter ecosystem that already covers most common systems.
  • Grafana — one dashboarding layer across many backends instead of a separate UI per signal type, with the flexibility to swap or add data sources without re-building every dashboard.
  • OpenTelemetry — instrument your application once, and the telemetry can go to Prometheus, Grafana’s stack, or a commercial vendor’s backend without re-instrumenting, because the Collector’s exporters are the swappable part, not your application code.

Cons

  • Prometheus — each server stores data locally and isn’t natively long-term or horizontally scalable on its own, so large or multi-cluster setups typically need an additional remote-storage layer (which is also why managed options like Grafana Cloud’s Mimir exist).
  • Grafana — it visualizes and queries, but doesn’t replace the backends; a team still has to run or buy Prometheus, Loki, and Tempo (or equivalents) underneath it.
  • OpenTelemetry — it is explicitly not a backend, so a team adopting it still has to choose and operate (or buy) something to store and query the data it emits, and the Collector’s receiver/processor/exporter configuration has a real learning curve.

Who It’s a Good Fit For

Teams running Kubernetes who want an open-standard, self-hostable metrics stack with no vendor lock-in are the clearest fit for Prometheus plus Grafana. Teams that already have telemetry scattered across several backends, or that want one place to build dashboards regardless of where the data lives, benefit from Grafana specifically. And any team instrumenting new services — or trying to standardize telemetry across polyglot microservices without hand-rolling a vendor SDK into each one — is well served by adopting OpenTelemetry at the instrumentation layer, even if the backend decision (Prometheus, a commercial APM tool, or something else) comes later.

Who Should Look Elsewhere

Teams that need billing-grade, exact accounting of every event should look past Prometheus’s model for that specific use case, per Prometheus’s own documentation. Teams that want a single vendor to also handle long-term storage, scaling, and support out of the box — rather than assembling and operating Prometheus, Loki, and Tempo themselves — may be better served by a managed platform like Grafana Cloud, or a full commercial observability suite, instead of the fully self-hosted combination. And teams with a single, simple application and no near-term need for distributed tracing may find adopting the full OpenTelemetry Collector pipeline more infrastructure than the problem currently requires.

Bottom Line

Prometheus, Grafana, and OpenTelemetry solve three different problems that happen to show up together constantly in Kubernetes environments: getting telemetry out of applications and infrastructure in a standard format (OpenTelemetry), storing and querying the metrics half of it efficiently (Prometheus), and turning all of it into dashboards and alerts a human can act on (Grafana). Most teams don’t choose one over the others — they wire all three together, and the main decisions left are how much of the storage and operations layer to self-host versus buy as a managed service.

FAQ

Do I need all three of these tools, or can I use just one?

You can start with just Prometheus and Grafana for metrics-only visibility — that combination predates widespread OpenTelemetry adoption and remains common. OpenTelemetry becomes valuable once you need distributed tracing across microservices or want to standardize instrumentation so you aren’t locked into a single vendor’s SDK. None of the three requires the others to function, but in a typical Kubernetes stack they end up complementing each other rather than competing.

Does OpenTelemetry replace Prometheus?

No. OpenTelemetry’s own documentation states plainly that it is not an observability backend — it standardizes how telemetry is produced and transported, while Prometheus is one of the systems that can store and query the metrics OpenTelemetry emits. A Collector can export metrics in Prometheus format or via Prometheus remote-write, making the two complementary rather than competing.

What’s the difference between kube-state-metrics and cAdvisor/node exporters?

kube-state-metrics reports on the state of Kubernetes API objects themselves — how many replicas a Deployment wants versus has, a pod’s phase, node conditions — built from a snapshot of the Kubernetes API server rather than from the nodes. Node- and container-level exporters (such as cAdvisor, often exposed via the kubelet, and node_exporter for host metrics) report actual resource consumption — CPU, memory, disk, network. Most Kubernetes observability stacks scrape both, since they answer different questions: “what does Kubernetes think is happening” versus “what is actually happening on the hardware.”

Sources


Discover more from Software Online Review

Subscribe to get the latest posts sent to your email.

Unknown's avatar

Author:

Innovations, logic & design thinking