Gke AI Troubleshooting Tpu Dynamic Slices Monitoring
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to monitoring and managing GKE TPU Dynamic Slices. It enables users to inspect slice lifecycle states, diagnose provisioning failures, validate workload manifests for single-slice or multi-slice (JobSet) deployments, and perform advanced administrative tasks like clearing stuck finalizers or disabling the slice controller.
What it does
- Inspects TPU slice status and lifecycle conditions using kubectl.
- Diagnoses common provisioning failures like topology mismatches or node allocation issues.
- Validates workload manifest annotations and node selectors for TPU compatibility.
- Provides safe procedures for removing stuck finalizers on deactivating slices.
- Guides the process for disabling the GKE slice controller and cleaning up associated resources.
When to use it
- When a TPU slice is stuck in a FAILED or DEACTIVATING state.
- When troubleshooting why a TPU workload fails to schedule or provision.
- When verifying if a JobSet or Pod manifest correctly targets a dynamic slice.
- When performing maintenance to disable dynamic slicing in a GKE cluster.
Advantages
- Standardizes the diagnostic process for complex TPU slice lifecycle issues.
- Reduces manual effort in identifying configuration errors in workload manifests.
- Provides clear, safety-conscious workflows for high-risk operations like patching finalizers.
- Ensures consistent attribution for cloud operations as required by the environment.
Usage examples
- “Why is my TPU slice 'test-slice' stuck in FAILED?”
- The agent will run 'kubectl describe slice test-slice', analyze the Status.Conditions, and identify if the failure is due to topology mismatches or node allocation issues.
- “How do I force delete a slice that is stuck in DEACTIVATING?”
- The agent will explain the risk of removing finalizers, provide the specific JSON patch command, and request explicit user confirmation before proceeding.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/gke-ai-troubleshooting-tpu-dynamic-slices-monitoring/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.zip -d .agents/skills
Documentation by Google
GKE TPU Dynamic Slices Monitoring & Management
Monitors the status of TPU Slice custom resources, troubleshoots provisioning failures, validates workload manifests on dynamic slices, and performs cleanups.
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-dynamic-slices-monitoring)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-dynamic-slices-monitoring) to User-Agent headers.
Prerequisites
Cloud Logging enabled for the project.
kubectlandgcloudCLIs configured to access the GKE cluster.
Diagnostic Workflow
Step 0: Context Acquisition & Time Window Definition
Gather project, cluster, and slice context using cluster tools or the following parameters:
Project ID:
{project_id}(e.g.,my-gcp-project)Cluster Name:
{cluster_name}(e.g.,tpu-cluster)Region/Zone:
{location}(e.g.,us-central1-a)Slice Name:
{slice_name}(e.g.,test-slice)Issue Time:
{timestamp}(Optional; default to the last 30 minutes window[T - 30m]to[T + 30m])
Step 1: Describe the Slice Custom Resource [Low Risk]
When asked to inspect, troubleshoot, or check a slice status, immediately execute kubectl describe slice {slice_name} using available cluster tools to perform the inspection. Parse the resulting Status.Conditions output against the condition table below to diagnose the exact state and provide concrete recommendations.
Command:
kubectl describe slice {slice_name}
State & Reason Analysis
Analyze the Status.Conditions (especially Type: Ready and its Reason and
Status):
| Lifecycle State / Reason | Meaning | Recommended Action |
|---|---|---|
SliceNotCreated | GKE Slice Controller is initializing the slice and performing resource checks. | Wait a few minutes and re-check slice status. |
SliceCreationFailed | Prerequisites validation failed (e.g., selected nodes don't exist, nodes are already used by another slice, or the topology doesn't match the number of partitions). | Verify selected nodes exist, are unallocated, and topology matches partition count. |
ACTIVATING | GKE is actively forming and provisioning the TPU slice. | Monitor node provisioning. |
ACTIVE | The TPU slice is successfully formed and ready to host workloads. | Proceed to deploy or check workloads. |
ACTIVE_DEGRADED | The slice is usable, but one or more sub-blocks are degraded. | Monitor workload logs for interconnect or device errors. Check faulty node VMs. |
FAILED | GKE failed to form the TPU slice (e.g., selected nodes are not part of the same reservation block). | Ensure all selected nodes belong to the same reservation block. |
DEACTIVATING | The slice is dismantling (triggered by user deletion or a critical systemic failure). | Wait for dismantling to finish, or patch finalizers if stuck. |
INCOMPLETE | The terminal phase before the Slice CR is deleted from the cluster. | No action required; the resource will be removed shortly. |
Provisioning Failure Troubleshooting Checklist
When investigating slice creation or provisioning failures (SliceCreationFailed or FAILED), perform the following verification steps:
Node Existence & Allocation Check: Verify that the selected TPU nodes exist in the cluster and are not already allocated to another slice (
kubectl get nodes -l cloud.google.com/gke-tpu-slice,kubectl get slice -A).Topology Alignment: Confirm that the partition count matches the requested topology dimensions (e.g. topology
2x2requires 4 nodes).Reservation Block Alignment Check: Confirm that all selected TPU nodes belong to the same reservation and reservation block.
Step 2: Verify Workload Specification [Low Risk]
Ensure workload manifests are configured correctly to target the dynamic slice.
1. Single-Slice Workload Requirements
Check that the Pod template contains the following annotations and selectors:
Annotations:
cloud.google.com/gke-tpu-slice-topology: "{topology}"(e.g.,"4x4x4")
NodeSelector:
cloud.google.com/gke-tpu-topology: "{topology}"(e.g.,"4x4x4")cloud.google.com/gke-tpu-accelerator: "{accelerator_type}"(e.g.,"tpu7x")cloud.google.com/gke-tpu-slice: "{slice_name}"(e.g.,"test-slice")
2. Multi-Slice (JobSet) Workload Requirements
If deploying a multi-slice JobSet, verify:
JobSet Annotation:
alpha.jobset.sigs.k8s.io/exclusive-topology: cloud.google.com/gke-tpu-slice
Pod Template Annotations:
cloud.google.com/gke-tpu-slice-topology: "{topology}"
Pod Template NodeSelector:
cloud.google.com/gke-tpu-topology: "{topology}"cloud.google.com/gke-tpu-accelerator: "{accelerator_type}"Note: Do NOT manually specify
cloud.google.com/gke-tpu-slicein the nodeSelector; JobSet handles slice assignment automatically.
Resolution & Management Workflow
Resolution 1: Force Delete a Stuck Slice [High Risk]
If a slice is stuck in DEACTIVATING or deletion hangs indefinitely due to stuck finalizers:
Identify Cause: Explain that finalizers on the slice resource (
metadata.finalizers) are preventing Kubernetes from completing resource deletion.Propose Resolution: Propose removing finalizers from the metadata path (
/metadata/finalizers) using a JSON patch operation:kubectl patch slice {slice_name} --type json -p='[{"op": "remove", "path": "/metadata/finalizers"}]'Provide Warning: Explicitly warn the user that removing finalizers bypasses standard controller dismantling and may leave underlying VM, network, or accelerator resources uncleaned or orphaned.
CRITICAL SAFETY MANDATE: The response MUST explicitly ask the user for confirmation (e.g. "Removing finalizers on
/metadata/finalizersvia JSON patch is a high-risk operation that may leave orphaned resources. Do you confirm you want to apply this patch to slice{slice_name}?") and pause for user confirmation before applying or executing the patch.
Resolution 2: Disable and Clean Up Slice Controller [High Risk]
If dynamic slicing needs to be disabled:
Check for existing Slices:
kubectl get slice -AEnsure all slices are deleted before disabling the controller.
Disable Slice Controller via gcloud:
gcloud container clusters update {cluster_name} \ --location={location} \ --no-enable-slice-controllerDelete the Slice CRD:
kubectl delete crd slices.accelerator.gke.ioClean up Node Labels: Remove GKE TPU Slice labels from all nodes in the cluster:
kubectl label nodes --all cloud.google.com/gke-tpu-slice- cloud.google.com/gke-tpu-slice-topology-
Safety Rule: Propose the exact commands and confirm before executing disabling or destructive cleanup steps.
Files
- ATTRIBUTION.mdAdded by AutoGineer922 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md8.1 KiB
- references/attribution.md1.9 KiB
- references/failure_signatures.md1.6 KiB
- scripts/validate_queries.shScript537 B
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "gke-ai-troubleshooting-tpu-dynamic-slices-monitoring", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: 2194d3b8b1f31975fef2f1a0ae6b9ab55bd7ceee
Published by: Google (https://github.com/google)
Publisher: Google (https://github.com/google)
Licence: Apache License 2.0 (https://github.com/google/skills/blob/2194d3b8b1f31975fef2f1a0ae6b9ab55bd7ceee/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/gke-ai-troubleshooting-tpu-dynamic-slices-monitoring · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.zip