Technology
Google Kubernetes Engine (GKE)
Dash0 integrates with Google Kubernetes Engine by retrieving platform-level and control plane metrics from Google Cloud Monitoring, offering visibility into node pools, autoscaling, and pod readiness.
Overview
Overview
Google Kubernetes Engine (GKE) is a managed Kubernetes platform from Google Cloud. It integrates deeply with Cloud Monitoring to expose platform-level metrics that are not available inside the cluster.
Monitoring the data plane
The Dash0 Kubernetes Operator automatically instruments your GKE workloads. Using Dash0 operator is the recommended way of getting visibility into your GKE workloads, and is preferred over configuring OpenTelemetry SDKs manually for each application.
Monitoring the control plane
You can collect GKE Autopilot control plane metrics using the OpenTelemetry Collector's googlecloudmonitoring receiver. These metrics are sourced from Cloud Monitoring and include autoscaler recommendations, node pool status, and pod readiness latencies — all of which are crucial for understanding your cluster's health and behavior at the platform level.
Use Cases
- Fetch GKE control plane metrics from Cloud Monitoring.
- Monitor node pool availability and autoscaler recommendations.
- View pod readiness and interruption latencies.
Metrics Summary
| Metric Name | Description |
|---|---|
kubernetes.io/autoscaler/container/cpu/per_replica_recommended_request_cores | Recommended CPU per replica |
kubernetes.io/autoscaler/container/memory/per_replica_recommended_request_bytes | Recommended memory per replica |
kubernetes.io/autoscaler/latencies/per_hpa_recommendation_scale_latency_seconds | Latency of autoscaler recommendations |
kubernetes.io/node_pool/interruption_count | Number of interruptions in the node pool |
kubernetes.io/node_pool/status | Status of the node pool |
kubernetes.io/node_pool/multi_host/available | Availability of multi-host node pools |
kubernetes.io/node/interruption_count | Node-level interruption count |
kubernetes.io/node/latencies/startup | Time taken for node startup |
kubernetes.io/node/status_condition | General node condition status |
kubernetes.io/pod/latencies/pod_first_ready | Time for pod to become ready after scheduling |
kubernetes.io/pod/network/policy_event_count | Count of network policy events per pod |
Full metric definitions available in Google Cloud Monitoring metrics for Kubernetes
Setup
Setup
This guide explains how to deploy the OpenTelemetry Collector inside your GKE cluster to collect metrics that are available via Cloud Monitoring, such as autoscaler recommendations, pod readiness latencies, and node pool interruptions.
These metrics are essential for monitoring GKE Autopilot and control plane behaviors.
1. Install the OpenTelemetry Collector
You can install the Collector using one of the supported methods:
Both support supplying a custom configuration.
2. Granting Access and Requirements
To collect metrics from Google Cloud Monitoring, the OpenTelemetry Collector must authenticate with the correct permissions and run in a properly configured GCP project.
Required Permissions
The Collector must use a Google Cloud service account with the following role:
roles/monitoring.viewer— grants read access to Cloud Monitoring metrics.
You can assign this role directly to a service account or via Workload Identity if running on GKE.
Authentication
The googlecloudmonitoring receiver uses Application Default Credentials (ADC) to authenticate.
The behavior depends on where you run the Collector:
- On GCP (GKE, Compute Engine): Credentials are picked up automatically from the attached service account — no need to set environment variables.
- Outside GCP (e.g., on a VM or local environment): You must set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable to point to a service account key file.
Wherever possible, prefer using GCP-native authentication mechanisms like Workload Identity over key files.
Running on GKE? Use Workload Identity
To bind a Kubernetes service account (KSA) to a GCP service account:
- Enable Workload Identity on your GKE cluster (enabled by default on Autopilot).
- Annotate your KSA with the email of the GCP service account.
- Ensure the GCP service account trusts the KSA via the
roles/iam.workloadIdentityUserbinding.
See Workload Identity docs for full setup details.
GCP Project Requirements
Make sure the project you're collecting metrics from meets the following:
- Billing is enabled — required for Cloud Monitoring to function beyond the free tier.
- Cloud Monitoring API is enabled — the collector depends on this to fetch metrics.
- Relevant metrics exist — the metrics you request must be emitted by services running in that project.
If you're not seeing expected data, check that the service is deployed and actively generating telemetry in the target project.
3. Configure the Collector
Below is a sample configuration to collect platform-level metrics from Google Cloud Monitoring.
Replace the <YOUR_GCP_PROJECT_ID> with your GCP project id. Dash0 GRPC endpoint and token can be obtained in the organization settings for your account under "Auth Tokens" and "Endpoints".
receivers:
googlecloudmonitoring:
collection_interval: 5m
project_id: <YOUR_GCP_PROJECT_ID>
metric_descriptor_filter: metric.type = starts_with("kubernetes.io/")
metrics_list:
- metric_name: "kubernetes.io/autoscaler/container/cpu/per_replica_recommended_request_cores"
- metric_name: "kubernetes.io/autoscaler/container/memory/per_replica_recommended_request_bytes"
- metric_name: "kubernetes.io/autoscaler/latencies/per_hpa_recommendation_scale_latency_seconds"
- metric_name: "kubernetes.io/node_pool/interruption_count"
- metric_name: "kubernetes.io/node_pool/status"
- metric_name: "kubernetes.io/node_pool/multi_host/available"
- metric_name: "kubernetes.io/node/interruption_count"
- metric_name: "kubernetes.io/node/latencies/startup"
- metric_name: "kubernetes.io/node/status_condition"
- metric_name: "kubernetes.io/pod/latencies/pod_first_ready"
- metric_name: "kubernetes.io/pod/network/policy_event_count"
exporters:
otlp/dash0:
endpoint: {{endpoint_otlp_grpc_hostname}}:{{endpoint_otlp_grpc_port}}
auth:
authenticator: bearertokenauth/dash0
extensions:
bearertokenauth/dash0:
scheme: Bearer
token: ${token}
processors:
deltatocumulative:
service:
extensions: [bearertokenauth/dash0]
pipelines:
metrics:
receivers: [googlecloudmonitoring]
processors: [deltatocumulative]
exporters: [otlp/dash0]4. Optimize for Cost and Performance
As of October 2, 2025, Google will charge based on the number of time series returned, not API calls. To reduce cost:
- Use
metric_descriptor_filterandmetrics_listto limit the scope of metrics pulled. - Keep collection_interval appropriate (e.g., 5m) to avoid excess traffic and redundant data.
5. Learn More