Troubleshoot GKE TPU VMs stuck in Compute Engine repair (`REPAIRING`)
This skill checks the VM status, the host events, and the GKE repair status, and
routes recovery through GKE instead of direct Compute Engine changes.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vm-repair-stuck)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vm-repair-stuck) to User-Agent headers.
Prerequisites
- Tools:
- For installing and initializing
gcloud(which covers authentication and
project selection), follow
- For installing
kubectland required plugins, follow
and
- Cloud Billing & Project Configuration: Ensure the project has an active
Cloud Billing account. Follow
to initialize gcloud and enable the Google Kubernetes Engine API
(container.googleapis.com), ensure the Compute Engine API
(compute.googleapis.com) and Cloud Logging API (logging.googleapis.com)
are enabled, and follow
Store cluster information for kubectl
to configure kubectl cluster credentials.
- Required IAM Roles:
- Kubernetes Engine Viewer (
roles/container.viewer) - Compute Viewer (
roles/compute.viewer) - Logs Viewer (
roles/logging.viewer) - For the user who enables node auto-repair in Step 5, item 1: Kubernetes
Engine Cluster Admin (roles/container.clusterAdmin)
- Documentation:
- View information about MIGs and managed instances
(Sections: "List MIGs", "Check the status of managed instances")
(Sections: "REPAIRING state")
(Sections: "Querying Cloud Audit Logs", "Reviewing Cloud Audit Logs")
(Sections: "Install kubectl", "Install required plugins", "Store cluster
information for kubectl")
(Sections: "View node pools in a Standard cluster", "Deploy a Pod to a
specific node pool")
(Sections: "Check the node's status and conditions", "Confirm node
preemption")
(Sections: "Multi-host TPU slice node pools")
(Sections: "Requirements", "Verify the status of the nodes and the
partitions", "Monitor the status of the Slice custom resource", "Hardware
maintenance and failures")
(Sections: "Key characteristics of dynamic slicing configurations")
(Sections: "Manage node failures", "Node failure and recovery")
(Sections: "Understand the faulty host report process", "Review report
faulty host operations")
(Sections: "Settings for Autopilot and Standard", "Repair criteria",
"Node repair process", "Verify node auto-repair is enabled for a Standard
node pool", "Enable auto-repair for an existing Standard node pool", "Get
information about recent automated repair events", "Node auto repair in TPU
slice nodes")
(Sections: "Before you begin", "Configure auto repair for TPU slice nodes")
(Sections: "Before you contact support", "Recommendations for efficient
support")
(Sections: "Resource: NodePool")
Read-only rule: Run read-only diagnostic commands only. Never drain,
delete, or re-create nodes, or run any other command that changes the cluster.
Give the user any fix to apply themselves.
When you recommend a fix, link the doc section that describes it.
Diagnostic workflow
Step 0: Collect context `[Low Risk]`
Collect the target parameters:
{project_id}: Google Cloud project ID{cluster_name}: GKE cluster name{location}: Cluster region or zone{cluster_mode}: Cluster mode (AutopilotorStandard){tpu_version}: TPU version (such as Ironwoodtpu7x, TPU v6e, v5p, v5e, or
v4) and whether the node pool is a single-host or multi-host TPU slice node
pool
{nodepool_name}: TPU node pool name{group_name}and{zone}: Name and zone of the managed instance group (MIG)
that backs the node pool:
- In a Standard cluster, follow
View node pools in a Standard cluster
to describe {nodepool_name} and read its instanceGroupUrls field (see
- In an Autopilot cluster (or if
{nodepool_name}isn't known), follow
to list the managed instance groups in {project_id} and find
{group_name} and {zone}.
{instance_name}: Affected TPU VM name, if known. If the user doesn't know
{instance_name}, Step 1 finds the instances in REPAIRING.
{issue_time}: Incident timestamp in RFC3339 UTC, if known
Step 1: Check the VM status in the managed instance group `[Low Risk]`
To list the instances in {group_name} with their status (STATUS /
instanceStatus) and current action (ACTION / currentAction), follow the
instructions in
Check the status of managed instances.
- Analysis:
STATUS(instanceStatus) isREPAIRING: Compute Engine is repairing
the VM because it encountered an internal error or its host server is
unavailable due to maintenance. The VM can't be used during the repair. See