gke-ai-troubleshooting-tpu-dynamic-slices-monitoring
What it does
This skill monitors and manages TPU slice resources on Google Kubernetes Engine. It is for teams running TPU workloads who need to see slice status and fix provisioning problems.
When to use it
- ✓When you want to check the lifecycle state of TPU slices in a GKE cluster.
- ✓When a TPU slice fails to provision and you need to find out why.
- ✓When a stuck finalizer or the slice controller needs to be fixed or switched off with care.
Skill link
https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-dynamic-slices-monitoring/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Check why my TPU slice test-slice in GKE is not provisioning, and tell me what to do.”
5 new skills a week. 1 minute to read.
How it works
It gathers project, cluster and slice details, then checks slice status and logs for the time window you choose. It can also validate single-slice or multi-slice JobSet manifests.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 an
FAQ
What time window does it check?
By default, the 30 minutes around the issue time, unless you give a different window.
Does it cover non-TPU node pools?
No. It is for TPU dynamic slices, not for general node pool creation.
Is patching finalizers safe?
It includes a careful process for stuck finalizers and warns about the effects of each step.
Details
Original description by the author
Monitors, troubleshoots, and manages GKE TPU Dynamic Slices custom resources. Use when checking TPU slice lifecycle states, troubleshooting slice provisioning failures, validating single-slice or multi-slice (JobSet) workload manifests, or safely patching stuck finalizers and disabling the slice controller. Don't use for generic GKE cluster node pool creation or standard non-TPU workload management (use gke-basics or gke-cluster-creation instead).
repo: google/skills
Popularity
- GitHub stars
- 22k
- Ranking position
- #10267
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
finding-google-skills
22kHelps your agent find the right Google guides for a setup task, such as hosting, databases, storage, sign-in or AI model serving.
gcloud
22kHelps your agent write and check Google Cloud gcloud commands, looking up exact syntax before it runs anything so it does not guess flags.
google-cloud-recipe-auth
22kGuides your agent through Google Cloud identity and access, including how people and services sign in and which permissions they get.
google-cloud-recipe-onboarding
22kWalks a new developer through first steps on Google Cloud, including choosing a project, linking billing, and deploying a first resource.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.