Diagnose and resolve GKE TPU Dynamic Slice creation and JobSet scheduling failures blocked by underlying Compute Engine managed instance groups (MIGs) stuck in an updating or unstable state (isStable=False). Use when TPU slice creation fails with a SliceCreationFailed status reason, when JobSets remain stuck in pending, or when MIG status reflects isStable=False or versionTarget.isReached=False during TPU slice formation. Don't use for SliceCreationFailed causes unrelated to MIG stability (use gke-ai-troubleshooting-tpu-dynamic-slices-monitoring) or general pod scheduling failures unrelated to TPU slices.
Written by Google and published in google/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
This skill helps diagnose GKE TPU Dynamic Slice creation failures and JobSet
scheduling delays when the Compute Engine managed instance groups (MIGs) that
back the TPU node pool aren't stable (status.isStable: false).
A SliceCreationFailed status reason means that slice creation failed because
prerequisites weren't met (for example, required Compute Engine resources are
missing) or preflight checks failed (see
Use dynamic slicing with a custom scheduler).
A MIG that is still creating, updating, or repairing instances is one cause to
check. This skill checks the slice status first, then the stability of the
backing MIGs.
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-slice-mig-stuck-updating)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-slice-mig-stuck-updating) to User-Agent headers.
gcloud (project selection and
authentication) and enabling the GKE API, follow
Before you begin.kubectl and configuring cluster credentials, follow the
"Install kubectl", "Install required plugins", and "Store cluster
information for kubectl" sections of
Install kubectl and configure cluster access.container.googleapis.com, compute.googleapis.com, and
logging.googleapis.com.roles/logging.viewer): Inspect Cloud Audit Logs for MIG
errors.roles/compute.viewer): Check MIG stability (isStable)
and instance progress.roles/container.viewer): Inspect Slice custom
resources (slices.accelerator.gke.io), nodes, and cluster operations.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.
[Low Risk]Collect the necessary contextual parameters from the user prompt or environment:
{project_id}, {cluster_name}, {location}, {nodepool_name}, and
{issue_time}.{mig_name} and {zone}: Name and zone of the managed instance group that
backs {nodepool_name}, from the node pool's instanceGroupUrls field (see
View node pools in a Standard cluster
and
Resource: NodePool).
If {nodepool_name} or {mig_name} isn't already known from a failing
Slice, find the affected partition, nodes, and backing MIG by following
Verify the status of the nodes and the partitions.[{issue_time} - 30m, {issue_time} + 30m] ({start_time} to {end_time}).[Low Risk]Slice custom
resource Status.Conditions for a SliceCreationFailed status reason and
identify the affected partitions, nodes, and {mig_name} by following the
"Monitor the status of the Slice custom resource" and "Verify the status of
the nodes and the partitions" sections of
Use dynamic slicing with a custom scheduler,
and
Monitor the status of the slice.{mig_name} is identified (or
by narrowing the results to {mig_name} once known), run this Cloud Logging
query to detect errors on the backing instance group manager across
[{start_time}, {end_time}]:
resource.type="gce_instance_group_manager"
resource.labels.instance_group_manager_name="{mig_name}"
severity>=ERROR
timestamp >= "{start_time}" AND timestamp <= "{end_time}"
Slice status reports SliceCreationFailed or the logs show
instance group errors, proceed to Step 2.Slice status is ACTIVE, rule out MIG
instability and check workload configuration.status.isStable) [Low Risk]Follow
Check whether a MIG is stable
to inspect the stability (status.isStable) and version target status
(status.versionTarget.isReached) of {mig_name}:
status.isStable: false: Changes are active or pending, or the MIG itself
is being modified. Proceed to Step 3.status.versionTarget.isReached: false: At least one instance isn't running
the target version yet (see
Automatically apply VM configuration updates in a MIG).
Proceed to Step 3.status.isStable: true and status.versionTarget.isReached: true: No
instances are undergoing or scheduled for changes (currentAction is NONE
for all instances), and the MIG itself isn't being modified. This rules out
MIG instability. If the Slice is still in SliceCreationFailed, hand off
to gke-ai-troubleshooting-tpu-dynamic-slices-monitoring, or follow the
"Create a Slice custom resource" and "Verify the status of the nodes and the
partitions" sections of
Use dynamic slicing with a custom scheduler.[Low Risk]Direct the user to the "Check the status of managed instances" and "List
instance errors" sections of
View information about MIGs and managed instances
(include both section names and the document title) to inspect individual
instance states (currentAction and instanceStatus) and list the most recent
errors in {mig_name}:
ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS or QUOTA_EXCEEDED, go to Step 5,
item 2.[Low Risk]A MIG that is still changing instances can be the result of a node pool upgrade or repair:
{nodepool_name} in [{start_time}, {end_time}]. Also review
Upgrade your node pools
for dynamic slicing upgrade requirements (required surge settings and
deleting active super-slices before upgrading).
{nodepool_name}.
[High Risk]Guardrail: Don't modify GKE-managed instance groups or VMs directly through Compute Engine. Manage node pools through GKE.
status.isStable: true) by following
Check whether a MIG is stable.ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS or QUOTA_EXCEEDED, rolling back
an upgrade won't resolve the shortage. Follow
Issue: Node pool creation fails due to insufficient resources
and the "Insufficient quota to satisfy the TPU request" and "Insufficient TPU
resources to satisfy the TPU request" sections of
Troubleshoot TPUs in GKE.{mig_name} remains
unstable, direct the user to Cloud Customer Care by following
Get support.status.isStable: true), follow the "Monitor the status of the Slice custom
resource" and "Create a Slice custom resource" sections of
Use dynamic slicing with a custom scheduler
to verify that the Slice reaches the ACTIVE state. If the Slice stays
in SliceCreationFailed after the MIG stabilizes, check whether the retry
annotation documented in "Create a Slice custom resource" is set on the
Slice.Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /gke-ai-troubleshooting-tpu-slice-mig-stuck-updating in Claude Code or $gke-ai-troubleshooting-tpu-slice-mig-stuck-updating in Codex.
The description says when to use it:
Use when TPU slice creation fails with a SliceCreationFailed status reason, when JobSets remain stuck in pending, or when MIG status reflects isStable=False or versionTarget.isReached=False during TPU slice formation.
Copy the gke-ai-troubleshooting-tpu-slice-mig-stuck-updating folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .claude/skills
cp -r /tmp/google-skills/skills/cloud/gke-ai-troubleshooting-tpu-slice-mig-stuck-updating .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if gke-ai-troubleshooting-tpu-slice-mig-stuck-updating does not appear.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .agents/skills
cp -r /tmp/google-skills/skills/cloud/gke-ai-troubleshooting-tpu-slice-mig-stuck-updating .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for gke-ai-troubleshooting-tpu-slice-mig-stuck-updating and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
gke-ai-troubleshooting-tpu-slice-mig-stuck-updating ships 2 files, 17.4 KB in total. Select a file to load it from GitHub.