Google Kubernetes Engine (GKE)

GKE monitoring from node pool to container

by Obseria · Containers and platforms
  • OpenTelemetry
  • Infrastructure Observability
  • Containers and platforms
Category
Containers and platforms
Key metrics
9
Ready-made
5 dashboards & alerts
Setup
3 steps
Standard
OTLP

Run the OpenTelemetry Collector on Google Kubernetes Engine and Obseria shows node conditions, pod restarts, resource limits and container logs in the same view as your service traces.

Standard Kubernetes receivers

kubeletstats and k8s_cluster collect node, pod, container and workload data on GKE exactly as on any other cluster, installed with the official Helm chart.

Workloads and traces together

Kubernetes attributes on every span and log line let you jump from a slow endpoint to the pod, node and deployment that served it.

Faster root cause analysis

Obseria Intelligence links failing pods with deploys, memory limits and node pressure and explains how it reached its conclusion.

Obseria interface

Obseria apps and capabilities: observability, APM, infrastructure and integrations
Obseria home dashboard with service health, open problems, SLO compliance and ingestion
Obseria trace explorer with span list and span attributes

Ready the moment data arrives

  • GKE cluster overview: nodes, pods, restarts
  • Node pool utilization against allocatable resources
  • Alert on crash-looping containers
  • Alert on pods pending longer than five minutes
  • Rollout status: desired versus available replicas

What Obseria monitors in your GKE clusters

Node pools

CPU, memory, filesystem and network per node, plus Ready, MemoryPressure and DiskPressure conditions.

Pods and containers

Resource usage compared with requests and limits, straight from each node's kubelet.

Workloads

Deployments, StatefulSets, DaemonSets, Jobs and CronJobs with desired and available replicas.

Autoscaling

Horizontal Pod Autoscaler replicas against their maximum, to see where scaling stops.

Container logs

stdout and stderr of every container with namespace and pod, correlated with traces.

Application telemetry

Traces, metrics and logs from OpenTelemetry SDKs in your pods, received over OTLP.

The GKE signals that matter

Obseria collects these values automatically and shows them in ready-made dashboards and alerts.

MetricUnitWhat it tells you
k8s.node.cpu.usage{cpu}CPU cores in use per node, to judge headroom per node pool.
k8s.node.memory.working_setByWorking set memory per node; the kubelet evicts pods when it runs low.
k8s.node.condition{condition}Ready, MemoryPressure and DiskPressure per node from the API server.
k8s.pod.memory.working_setByPod memory that cannot be reclaimed, the value that leads to OOM kills.
container.cpu.usage{cpu}CPU per container, to find the container that drives a pod's usage.
container.memory.working_setByWorking set memory per container for precise limit tuning.
k8s.container.restarts{restart}Restarts per container, the clearest sign of crash loops.
k8s.pod.phasePod phase per pod, to find pods stuck in Pending or Failed.
k8s.deployment.available{pod}Available replicas per deployment, compared with k8s.deployment.desired.

Set up GKE monitoring in minutes

  1. 1

    Get cluster credentials

    Run gcloud container clusters get-credentials for your GKE cluster and add the OpenTelemetry Helm repository.

  2. 2

    Install the node collector

    Deploy the OpenTelemetry Collector as a DaemonSet with the kubeletMetrics, kubernetesAttributes and logsCollection presets, exporting to Obseria over OTLP.

  3. 3

    Install the cluster collector

    Add a one-replica release with the clusterMetrics preset for workload state, restarts and node conditions.

Example configuration · BASH
# Connect kubectl to the GKE cluster
gcloud container clusters get-credentials prod-cluster --region europe-west3

helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update

# Node collector (DaemonSet): kubeletstats, k8sattributes and container logs.
# values.yaml enables the kubeletMetrics, kubernetesAttributes and
# logsCollection presets and exports via otlphttp:
#   endpoint: ${OBSERIA_OTLP_ENDPOINT}
#   headers:  { Authorization: "Bearer ${OBSERIA_TOKEN}" }
helm install otel-collector open-telemetry/opentelemetry-collector -f values.yaml

# Cluster collector: exactly one replica for the k8s_cluster receiver
helm install otel-cluster open-telemetry/opentelemetry-collector \
  --set mode=deployment --set replicaCount=1 \
  --set image.repository=otel/opentelemetry-collector-contrib \
  --set presets.clusterMetrics.enabled=true \
  -f cluster-values.yaml

Why GKE monitoring matters

Google Kubernetes Engine manages the control plane and, in Autopilot mode, the nodes as well. What it cannot manage for you is how your workloads behave: whether requests and limits match real usage, whether a new release rolls out cleanly, or whether a single deployment keeps restarting at night. GKE monitoring closes that gap by showing cluster health and workload behaviour together with the traces and logs of the services that run on it.

Google Cloud already offers system metrics for GKE in Cloud Monitoring. Obseria can read those as part of the Google Cloud integration. For detailed, label-rich data per pod and container, the OpenTelemetry Collector is the more direct path: it runs inside the cluster, reads the kubelet and the Kubernetes API, and sends everything over OTLP without a proprietary agent.

GKE monitoring with the OpenTelemetry Collector

GKE is conformant Kubernetes, so the standard setup applies. It consists of two Helm releases of the OpenTelemetry Collector:

  • DaemonSet on every node: the kubeletstats receiver collects node, pod and container metrics, the filelog receiver reads container logs, and the k8sattributes processor adds namespace, pod, deployment and node names. Your applications send OTLP traces to this collector on the same node.
  • Single-replica deployment: the k8s_cluster receiver reports cluster-wide facts such as pod phases, container restarts, workload replicas, HPA state and node conditions. One replica only, because several would report every object several times.

On Autopilot clusters, GKE restricts privileged workloads and host access. Review the Autopilot rules for DaemonSets and read-only hostPath mounts before enabling log collection, and use Workload Identity for any Google Cloud API the collector calls instead of a service account key.

Key metrics for Google Kubernetes Engine monitoring

  • Node pressure: k8s.node.condition together with k8s.node.memory.working_set and k8s.node.cpu.usage. Enable node conditions in the receiver explicitly, they are off by default.
  • Container resources: container.memory.working_set and container.cpu.usage compared with limits. On Autopilot, where requests also drive billing, these numbers help right-size workloads.
  • Stability: k8s.container.restarts and k8s.pod.phase show crash loops and unschedulable pods.
  • Rollouts: k8s.deployment.available against k8s.deployment.desired shows when a release does not become ready.

Common GKE problems and how to spot them

Unschedulable pods

When the cluster autoscaler hits the node pool maximum or a zone runs out of capacity for the requested machine type, pods remain Pending. An alert on pods pending for several minutes, combined with the node count per pool, shows whether you face a quota, capacity or configuration problem.

Memory limits and OOM kills

A working set that climbs to the container limit, followed by a restart, is the classic OOM pattern. Comparing the curve across releases tells you whether a new version uses more memory or whether the limit was always too tight.

Node upgrades and preemption

GKE upgrades node pools automatically, and Spot VMs can be reclaimed at short notice. Both drain nodes and reschedule pods. Seeing node condition changes and pod restarts on one timeline separates planned disruptions from real application failures.

Slow services on healthy clusters

Sometimes all nodes look fine while users still see latency. Traces with Kubernetes attributes reveal whether the delay sits in one pod, one node or a downstream dependency such as Cloud SQL or Pub/Sub.

Best practices for GKE cluster monitoring

  1. Set k8s.cluster.name and the project as resource attributes so several clusters and projects stay distinguishable.
  2. Run the cluster collector with exactly one replica and enable node conditions.
  3. Define SLOs on the services that matter to users, then use cluster metrics to explain SLO burn rather than alerting on every metric.
  4. Keep the Obseria token in a Kubernetes secret and use Workload Identity for Google Cloud APIs.
  5. Filter or drop namespaces you do not need, for example system namespaces, to keep data volume focused.

How Obseria helps with GKE observability

Obseria ingests cluster metrics, container logs and application traces from the OpenTelemetry Collector over OTLP and can add Cloud Monitoring metrics through the Google Cloud integration. TopoGraph shows how services, pods and nodes relate. When an SLO starts burning, Obseria Intelligence checks deploys, restarts, resource limits and node events and presents the root cause with its chain of evidence. Dashboards, alerts and SLOs are included, EU hosting is available, and your data stays exportable via OTLP.

Learn more

GKE monitoring FAQ

The OpenTelemetry Collector runs on Autopilot, but Autopilot restricts privileged access and host mounts. Check the current Autopilot constraints for DaemonSets and hostPath volumes before enabling kubelet metrics and log collection, and adjust the Helm values accordingly.

No, the collector works independently. If you already use Cloud Monitoring metrics for GKE, Obseria can read them through the Google Cloud integration with a read-only service account, so both views end up in one place.

The k8s_cluster receiver reports the state of every Kubernetes object. With several replicas each object would be reported several times, which distorts counts such as pods per phase or restarts.

Configure the OpenTelemetry SDK in each pod with OTEL_EXPORTER_OTLP_ENDPOINT pointing at the node collector, typically the node's host IP on port 4318. The collector enriches the traces with Kubernetes attributes and forwards them to Obseria.

Yes. Install the collector in each cluster and set distinct cluster names. Obseria shows all clusters together and lets you filter by project, cluster, namespace and workload.

Start monitoring GKE today

Connect GKE in minutes with OpenTelemetry or the Obseria Agent. Free for 14 days.