Diagnose and resolve GKE TPU slice creation failures (SliceCreationFailed) caused by partition overlap conflicts where requested TPU partitions or their nodes are already used by another slice or JobSet. Use when diagnosing GKE TPU slice creation failures with SliceCreationFailed partition or node conflicts. Don't use for general slice lifecycle states or slice provisioning failures without node overlap (use gke-ai-troubleshooting-tpu-dynamic-slices-monitoring), quota exhaustion, or unresponsive TPU nodes.
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.
A dynamic slice fails to form with the status reason SliceCreationFailed when,
among other documented causes, any of its nodes are already used by another
slice. This skill confirms the failure, rules out the other documented causes,
finds the slice that uses the same nodes, and routes the fix through GKE.
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-partition-overlap)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-partition-overlap) to User-Agent headers.
gcloud (which covers authentication and
project selection), follow
Before you begin.kubectl and required plugins, follow
Install kubectl
and
Install required plugins.gcloud and enable the Google Kubernetes Engine API
(container.googleapis.com), ensure the Cloud Monitoring API
(monitoring.googleapis.com) is enabled, and follow
Store cluster information for kubectl
to configure kubectl cluster credentials.roles/container.viewer)roles/monitoring.viewer)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 target parameters:
{project_id}: Google Cloud project ID{cluster_name}: GKE cluster name{location}: Cluster region or zone{slice_name}: Name of the Slice custom resource that failed to form{node_pool_name}: Name of the TPU node pool (or node pools) backing the
partitions in {slice_name}, if known. If the user doesn't know
{node_pool_name}, after Step 1 run the Cloud Monitoring query in Step 3
for the partition IDs in {partition_ids} and read the node_pool_name
label on the
k8s_node_pool
monitored resource.{issue_time}: Incident timestamp in RFC3339 UTC, if known. If the user
doesn't know {issue_time}, use the Last Transition Time
(lastTransitionTime, "A timestamp of the most recent status change" in
Slice status)
of the Ready condition from Step 1. By default, query Cloud Monitoring over
a 60-minute window around {issue_time}.SliceCreationFailed status [Low Risk]To describe {slice_name}, follow the instructions in the section
Monitor the status of the Slice custom resource.
Status > Conditions, check that the Reason of the Ready condition
is SliceCreationFailed, and record its Last Transition Time (to use as
{issue_time} if needed).Spec > Partition Ids as {partition_ids}, the
Topology, and any Labels and Annotations on {slice_name}.Ready reason isn't SliceCreationFailed, this skill doesn't apply.
See
Slice status
for what each reason means, and hand off to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.[Low Risk]Per
Create a Slice custom resource,
slice creation also fails with SliceCreationFailed when:
(A × B × C) / 64
partition IDs.If either of those causes applies, hand off to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.
Otherwise, follow
Verify the status of the nodes and the partitions
on {node_pool_name}:
{partition_ids}.{partition_ids}, record every partition ID of
every shape (4x4x4, 2x4x4, 2x2x4, 2x2x2, and 2x2x1) from the
cloud.google.com/gke-tpu-partition-.*-id labels. Per
Dynamic slicing configurations,
dynamic sub-slicing partitions a 4x4x4 sub-block into smaller topologies on
the same physical node pool, so partitions of different shapes share the same
nodes.cloud.google.com/gke-tpu-partition-.*-state label. Per
Verify the status of the nodes and the partitions
and
Define the partition health selection,
count HEALTHY partitions and DEGRADED 4x4x4 partitions ("still usable
for dynamic slice formation"; "Smaller topologies don't have a degraded
state") as available. Partitions in UNHEALTHY ("can't be used to form a
slice"), UNSET, or INCOMPLETE aren't available. If a requested partition
is in UNHEALTHY, UNSET, or INCOMPLETE, suggest an available partition
whose nodes no other slice uses (Step 4, item 2), hand off to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring, or escalate to Cloud
Customer Care (Step 4, item 4).[Low Risk]Per
Create a Slice custom resource,
slice creation fails with SliceCreationFailed when any nodes on the custom
resource are used by another slice. Because partitions of different shapes on
the same sub-block share nodes (see
Dynamic slicing configurations),
another slice conflicts with {slice_name} if it lists any of the partition
IDs (of any shape) recorded on {slice_name}'s nodes in Step 2.
Slice custom resources in the cluster (as shown in
Delete the slice)
and describe each one following
Monitor the status of the Slice custom resource
to read Spec > Partition Ids, Metadata > Labels, and Status >
Conditions (Ready reason):
{slice_name} whose Spec > Partition Ids
includes any partition ID recorded on {slice_name}'s nodes in Step 2
(whether the exact ID in {partition_ids} or another shape's partition ID
on the same nodes) as conflicting. Record its name, its Ready reason
(such as ACTIVE), and whether Kueue manages it (Step 4, item 1).{issue_time}), query the kubernetes.io/accelerator/partition/state
metric listed in
Monitor the metrics of the slice.
Per
Kubernetes metrics,
this metric "is 1 if the partition state is detected, 0 otherwise", and its
labels include partition_id, slice_id ("ID of the associated slice"),
and state ("Health of the partition (e.g., HEALTHY, UNHEALTHY)"). Run the
query for each {partition_id} recorded on {slice_name}'s nodes in Step 2:kubernetes_io:accelerator_partition_state{
monitored_resource="k8s_node_pool",
cluster_name="{cluster_name}",
partition_id="{partition_id}"
}
1 (where state="HEALTHY" means the
partition is healthy and functional, per
Verify the status of the nodes and the partitions).slice_id only as "ID of the associated slice", always confirm the
conflicting slice from the Slice custom resources in the cluster rather
than from slice_id alone: list the Slice custom resources as shown in
Delete the slice,
describe each one following
Monitor the status of the Slice custom resource,
and check which slice's Spec > Partition Ids includes the partition ID
(or any other partition ID of any shape on the same nodes from Step 2).1) showed an
associated slice_id around {issue_time}: The conflict may already be
over. Proceed to Step 4, item 1 (to re-create or retry {slice_name}) and
then Step 4, item 4.Slice custom resources nor the metric around
{issue_time} shows another slice: Node overlap isn't confirmed. Hand
off to gke-ai-troubleshooting-tpu-dynamic-slices-monitoring or escalate
to Cloud Customer Care (Step 4, item 4).[High Risk]Guardrails:
- Never delete or change the other slice, or stop its workload, to free the nodes. Deleting a
Slicecustom resource starts dismantling that slice (DEACTIVATING, see Monitor the status of the Slice custom resource). The owner of that slice decides when to release it.- Never manually modify or delete
Slicecustom resources created by Kueue. Per Target your node pool to belong to a block or a sub-block, "Avoid manually modifying Slice custom resources created by Kueue."- Never change GKE-managed instance groups or VMs directly through Compute Engine, and never delete node pools to free a partition. Manage node pools and slices through GKE.
First, check whether Kueue manages {slice_name} or the conflicting slice:
kueue.gke.io/tpu-slice-used-by-namespace and
kueue.gke.io/tpu-slice-used-by-workload labels.s-<topology> prefix, decoupling them from specific workload names."Then apply the matching option:
kueue.gke.io/...
labels or an s-<topology> name prefix): Do not suggest deleting the
Slice custom resource directly. Point the workload owner to
Clean up
(deleting the JobSet triggers Kueue to delete the associated Slice
custom resources) and, if slice reuse keeps an idle s-<topology> slice
allocated after a job ends, to
Enforce slice deletion per workload
(kueue.gke.io/tpu-enforce-slice-deletion: "true").{slice_name} retries: Check whether {slice_name} already has
slice.gke.io/retry-on-failure: "true" in Metadata > Annotations. Per
Create a Slice custom resource,
when a Slice custom resource is created with this annotation, "If the
slice isn't created because of the SliceCreationFailed status reason, the
controller will retry until the slice is successfully formed." Because the
documentation only shows configuring
slice.gke.io/retry-on-failure: "true" in the Slice manifest when
creating a Slice custom resource (and doesn't state that adding the
annotation to an existing slice already in SliceCreationFailed starts a
retry), if {slice_name} wasn't created by Kueue and lacks the annotation,
tell the user to delete {slice_name} following
Delete the slice
and re-create it with slice.gke.io/retry-on-failure: "true" in its
manifest following
Create a Slice custom resource.Slice custom resources directly (not through Kueue) and can't wait,
direct them to
Verify the status of the nodes and the partitions
and
Create a Slice custom resource
so they can pick available partitions (HEALTHY partitions, or DEGRADED
4x4x4 partitions) whose nodes aren't used by any other slice (across all
partition shapes on those nodes) and create the Slice custom resource with
them.Slice
custom resources directly: Per
Target your node pool to belong to a block or a sub-block
and
Create a dynamic slice with Kueue and TAS,
instead of creating Slice custom resources directly, teams can schedule
GKE workloads with Kueue and Topology Aware Scheduling (TAS), where "Kueue
automatically handles the creation and deletion of Slice custom resources"
and admits a workload after its slice becomes active.ACTIVE: The slice is fully formed, healthy, and ready to execute
workloads.ACTIVE_DEGRADED: The slice is formed, and workloads can run, but
performance might be impacted.SliceCreationFailed after no other slice uses the nodes, or
FAILED: Hand off to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring, or advise the user
to contact Cloud Customer Care following
Before you contact support
and
Recommendations for efficient support.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-partition-overlap in Claude Code or $gke-ai-troubleshooting-tpu-partition-overlap in Codex.
The description says when to use it:
Use when diagnosing GKE TPU slice creation failures with SliceCreationFailed partition or node conflicts.
Copy the gke-ai-troubleshooting-tpu-partition-overlap 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-partition-overlap .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-partition-overlap 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-partition-overlap .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-partition-overlap 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-partition-overlap ships 2 files, 21.4 KB in total. Select a file to load it from GitHub.