gke-ai-troubleshooting-tpu-metrics-monitoring

Monitors and troubleshoots GKE TPU workloads using system metrics and PromQL queries.

19.1k|1.5k|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/google/skills --skill gke-ai-troubleshooting-tpu-metrics-monitoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gke-ai-troubleshooting-tpu-metrics-monitoring
Source: https://github.com/google/skills/tree/main/skills/cloud/gke-ai-troubleshooting-tpu-metrics-monitoring
Command: npx skills add https://github.com/google/skills --skill gke-ai-troubleshooting-tpu-metrics-monitoring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Diagnosing whether TPU workload interruptions or performance issues on GKE stem from underlying infrastructure is difficult without the right metrics. This Skill provides a structured diagnostic workflow using GKE system metrics and PromQL to pinpoint node, node pool, and accelerator-level problems.

Core Features & Use Cases

  • TPU Runtime Metrics Monitoring: Track TensorCore duty cycle, accelerator memory usage, and memory bandwidth utilization at container and node levels.
  • Node and Node Pool Health Checks: Query node readiness conditions, multi-host TPU node pool status, and availability using PromQL.
  • Interruption and Recovery Analysis: Break down interruptions by type (Termination, Maintenance, Preemption) and reason, and calculate MTTR and MTBI over 7-day windows.
  • Use Case: When a TPU training job on GKE is repeatedly interrupted, use this Skill to determine whether host maintenance, preemption, or hardware errors caused the disruption and measure recovery time.

Quick Start

Ask the agent to check whether the TPU nodes in your GKE cluster are healthy and identify the cause of recent workload interruptions.

Frequently Asked Questions about gke-ai-troubleshooting-tpu-metrics-monitoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor TPU utilization on GKE?

Query the kubernetes.io/container/accelerator/duty_cycle metric in Cloud Monitoring to see the percentage of time TensorCores were actively processing. For GKE 1.28.1-gke.1066000 or later, tensorcore_utilization and memory_bandwidth_utilization metrics are also available.

How to check if a GKE TPU node is ready using PromQL?

Query kubernetes_io:node_status_condition with condition="Ready" and status="True" filtered by cluster and node name. This requires GKE version 1.32.1-gke.1357001 or later to expose node status condition metrics.

What GKE version is required for TPU runtime metrics?

TPU runtime metrics require GKE version 1.27.4-gke.900 or later with system metrics enabled. The TPU container must expose port 8431 for Prometheus scraping, and JAX workloads need version 0.4.14 or later.

Why is my TPU utilization low during training?

A duty_cycle or tensorcore_utilization value below 20% during active training indicates heavy underutilization, typically caused by data pipeline bottlenecks or small batch sizes. Check input data loading performance before investigating hardware.

How do I calculate MTTR and MTBI for GKE TPU node pools?

Use PromQL to divide the sum of node_pool_accelerator_times_to_recover_sum by its count over 7 days for MTTR. For MTBI, divide total node uptime by the sum of node_interruption_count over the same window.

When should I not use TPU metrics monitoring for debugging?

This approach does not cover general non-TPU GKE workload monitoring or non-metric TPU debugging such as log analysis or code-level profiling. Use it only for infrastructure-level diagnosis via GKE system metrics.