
You instrumented your applications correctly, adopted OpenTelemetry (OTel), and finally achieved end-to-end tracing across your microservices. The engineering team is thrilled. Then, Finance forwards you the monthly cloud invoice, and the CTO demands a meeting. Your observability costs have surged 10x in a single month.
What happened? The truth about opentelemetry kubernetes cost is that while the OTel software is open-source and free, the infrastructure required to transport and store the telemetry is not. When you combine the explosive data volume of OTel auto-instrumentation with the rapid churn of Kubernetes autoscaling, you create a perfect financial storm.
In this deep-dive SRE/FinOps guide, we will expose the hidden cloud egress taxes (NAT and Cross-AZ penalties), deconstruct the metric cardinality explosion, fix distributed trace sampling, and reveal why Elite engineering teams are moving their observability stacks to Bare Metal to escape the SaaS billing trap.
Phase 1: HPA and The Cardinality Explosion
When investigating why datadog is so expensive kubernetes clusters often reveal a hidden culprit: the Horizontal Pod Autoscaler (HPA). As traffic spikes, your HPA rapidly spins up dozens of new pods, and then destroys them when traffic subsides.
# The SRE Fix: Filter high-cardinality attributes at the OTel Collector
processors:
transform/metrics:
error_mode: ignore
metric_statements:
- context: resource # SRE FIX: You must use 'resource' context for K8s pod labels!
statements:
# Strip ephemeral pod identifiers before export to prevent billing spikes
- delete_key(attributes, "k8s.pod.uid")
- delete_key(attributes, "k8s.pod.name")Phase 2: The Stealth Egress Tax (NAT & Cross-AZ)
The most devious opentelemetry kubernetes egress cost trap doesn't come from your observability vendor (Datadog/New Relic). It comes directly from AWS, Azure, or GCP. Cloud providers charge heavily for data leaving their network or moving between boundaries.
- The Cross-AZ Penalty: A best-practice OTel architecture uses Edge DaemonSets that forward data to a centralized Gateway Collector. If a DaemonSet in
us-east-1asends 5TB of traces to a Gateway inus-east-1b, AWS charges $0.01/GB in both directions. - The NAT Gateway Processing Fee: If your Kubernetes cluster sits in a private subnet (which it should), sending telemetry to a public SaaS backend requires passing through a NAT Gateway. You pay $0.045/GB for NAT processing PLUS $0.09/GB for Internet Egress.
- The Reality: You are paying $0.135 per GB just to move your own data, before your vendor even bills you for ingestion!
Phase 3: Fixing the Sampling Blindspot
To survive the egress taxes, you must aggressively reduce trace volume before it leaves your cluster. However, many engineers make a critical mistake when researching how to reduce opentelemetry costs kubernetes: they use Head-Based Sampling.
The SRE Cure: When deploying opentelemetry collector tail-based sampling cost optimizations, you must architect two distinct layers. Deploy a Load Balancing Exporter on your Edge Agents (DaemonSets) with routing_key: "traceID". This ensures all spans of the same trace reliably hit the exact same Gateway replica where the tail-sampling processor lives.
# 1. Edge Agent (DaemonSet) Configuration
exporters:
loadbalancing:
routing_key: "traceID" # CRITICAL: Ensure all spans for a trace reach the same Gateway replica
protocol:
otlp:
endpoint: http://gateway-service.observability.svc.cluster.local:4317
# ----------------------------------------------------
# 2. Gateway Collector Configuration
processors:
tail_sampling:
decision_wait: 10s # Buffer time to wait for trace completion
num_traces: 100000 # Memory sizing (Monitor OOM kills!)
policies:
# Policy 1: Always keep 100% of Errors
- name: keep-errors
type: status_code
status_code:
status_codes: [ERROR]
# Policy 2: Sample only 5% of healthy, normal traffic
- name: sample-healthy
type: probabilistic
probabilistic:
sampling_percentage: 5Phase 4: Repatriating Observability to Bare Metal
Even with aggressive Tail-Based sampling, high-throughput microservices will still generate terabytes of vital telemetry data. When evaluating a kubernetes observability bill, the harsh reality is that the public cloud billing model penalizes you for deeply monitoring your own infrastructure.
This is why Elite engineering organizations are repatriating their heavy observability stacks to eliminate both network taxes and storage bottlenecks.
Kubernetes & OpenTelemetry Cost FAQ
OpenTelemetry is free, but telemetry transport and storage are not. Auto-instrumentation increases span volume by 5x, and transmitting this raw data across cloud NAT Gateways triggers massive hidden egress fees before it even reaches your vendor.
As the Horizontal Pod Autoscaler (HPA) scales pods up and down, it generates ephemeral resource labels like k8s.pod.name and k8s.pod.uid. If not dropped using context: resource at the OTel Collector, every new pod creates a new unique time-series metric, triggering severe overage penalties in Datadog or Prometheus.
In public clouds, if an OTel DaemonSet agent sends traces to a centralized OTel Gateway in a different Availability Zone (AZ), it incurs a hidden $0.01-$0.02/GB cross-AZ penalty in both directions, silently multiplying your cloud bill.
Tail-Based Sampling requires evaluating the entire trace before deciding to keep or drop it. In a multi-replica Gateway setup, spans of the same trace may hit different replicas causing the logic to fail. You must use a Load Balancing Exporter with traceID routing at the DaemonSet layer to ensure all spans land on the same Gateway node.
























































