This document explains how to provision TPU node pools and schedule dynamic slices in Google Kubernetes Engine (GKE) by using Kueue and Topology Aware Scheduling (TAS).
You can also use dynamic slicing by directly interacting with Slice custom resources. For more information, see Use dynamic slicing with a custom scheduler.
Before following these instructions, ensure that you understand the concepts of dynamic slicing.
Requirements
To use dynamic slicing in GKE, you must meet the following requirements:
- Use a Standard cluster in the Rapid channel in one of the following
versions:
- For dynamic super-slicing configuration (topologies equal to or larger
than
4x4x4), use version 1.35.2-gke.1842000 or later. - For dynamic sub-slicing configuration (topologies smaller
than
4x4x4), use version 1.36.0-gke.3712000 or later.
- For dynamic super-slicing configuration (topologies equal to or larger
than
- Use Ironwood (TPU7x) version.
- Use the Container-Optimized OS image for your nodes.
- To use incremental provisioning, use All Capacity mode reservations. All Capacity mode is a feature enabled by TPU Cluster Director.
- For dynamic sub-slicing, ensure that your nodes have a pending maintenance events. Monitor your instances for pending maintenance events. If any of your nodes have a pending maintenance event with an end time between September 18, 2026 and September 30, 2026, you must manually trigger the host maintenance event on those nodes before you can use sub-slicing.
Before you begin
Before you start, make sure that you have performed the following tasks:
- Enable the Google Kubernetes Engine API. Enable Google Kubernetes Engine API
- To use the Google Cloud CLI for this task,
install and then
initialize the
gcloud CLI. If you previously installed the gcloud CLI, get the latest
version by running the
gcloud components updatecommand. Earlier gcloud CLI versions might not support running the commands in this document.
- Ensure that you have an existing Standard cluster in version 1.35.2-gke.1842000 or later, in the Rapid channel. To create a new cluster, see Creating a regional cluster.
- Ensure you have sufficient quota for Ironwood (TPU7x) in your region.
- If you plan to run multislice workloads, install JobSet v0.10.1 or later
- Request TPU capacity in All Capacity mode.
Use dynamic slicing in GKE with Kueue
This section describes the workflow for using dynamic slicing in GKE.
- View the topology and health status of All Capacity mode reservations.
- Enable the slice controller in your cluster.
- Install Kueue, JobSet, and LWS.
- Create TPU node pools.
- Configure Kueue to create a Slice custom resource.
- Run workloads on dynamic slicing with Kueue.
- Clean up.
Enable the slice controller
To use dynamic slicing, enable the slice controller in your cluster.
Update your cluster:
gcloud container clusters update CLUSTER_NAME \ --location=LOCATION \ --enable-slice-controllerReplace the following:
CLUSTER_NAME: the name of your cluster.LOCATION: the region with your available TPU capacity.
Get credentials so that you can communicate with your cluster with
kubectlcommands:gcloud config set container/cluster CLUSTER_NAME gcloud container clusters get-credentials CLUSTER_NAME \ --location=LOCATIONIn the output of the following command, verify that the
slices.accelerator.gke.iovalue is present:kubectl get crd slices.accelerator.gke.ioThe output is similar to the following:
slices.accelerator.gke.io 2026-01-09T23:58:02Z
Install Kueue, JobSet, and LWS
If you have already installed Kueue, JobSet, and LWS, you can skip this section.
Install Kueue
Follow instructions from the Kueue documentation or run the following command:
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/KUEUE_VERSION/manifests.yaml
Replace KUEUE_VERSION with the required Kueue version
based on your topology requirements. For dynamic sub-slicing, use Kueue
v0.18.2 or later. For dynamic super-slicing, use Kueue v0.16.6 or later.
Install JobSet
Follow instructions from the JobSet documentation or run the following command:
kubectl apply --server-side -f https://github.com/kubernetes-sigs/jobset/releases/download/JOBSET_VERSION/manifests.yaml
Replace JOBSET_VERSION with the required JobSet version
based on your topology requirements. For dynamic sub-slicing, use JobSet
v0.12.0 or later. For dynamic super-slicing, use JobSet v0.11.1 or later.
Install LWS
LeaderWorkerSet (LWS) is required only for dynamic sub-slicing.
Follow instructions from the LWS documentation or run the following command:
kubectl apply --server-side -f https://github.com/kubernetes-sigs/lws/releases/download/LWS_VERSION/manifests.yaml
Replace LWS_VERSION with the required LWS version. Use
LWS v0.8.0 or later.
Create node pools with incremental provisioning
This section describes how to create the TPU node pools with incremental provisioning. GKE converts all your TPU capacity into node pools comprising 16-node groups of Ironwood (TPU7x) VMs, or sub-blocks. GKE provisions these node pools even when it can't find all of the healthy VMs by placing nodes on healthy parts of the host machine and incrementally provisioning unhealthy machines while they are repaired.
You can target your node pool to belong to any of the following:
- A specific block of TPUs, which is exposed in All Capacity mode reservations. Block targeting allows GKE to create the node pool in any available sub-block within the specified block.
- A specific sub-block, or a specific 16-node group of Ironwood (TPU7x) VMs, of TPUs for more granular control.
Create a workload policy
To create a TPU slice node pool with Ironwood (TPU7x), you must first create a
workload policy with the accelerator-topology-mode field set to provision_only. This setting
triggers the incremental provisioning process.
Create a workload policy:
gcloud compute resource-policies create workload-policy WORKLOAD_POLICY_NAME \
--project=PROJECT_ID \
--region=REGION \
--type=HIGH_THROUGHPUT \
--accelerator-topology=4x4x4 \
--accelerator-topology-mode=provision_only
Replace the following:
WORKLOAD_POLICY_NAME: a name for your workload policy.PROJECT_ID: your Google Cloud project ID.REGION: the region for the workload policy.
In this command, do the following::
- Always set the
accelerator-topologyfield to4x4x4to match the total number of chips within a single sub-block. - Always set the
accelerator-topology-modefield toprovision_onlyto ensure the incremental provisioning process is triggered. When theprovision_onlyfield is set, the node pool provisions TPU nodes without forming ICI or OCS links.
Target your node pool to belong to a block or a sub-block
You can target specific sub-blocks or blocks within your All Capacity mode reservation.
- Target a block: each node pool uses capacity from a specified block. GKE places the node pool within an available sub-block in that block. You must create as many node pools as there are sub-blocks in the block you want to use.
Target a sub-block: each node pool maps to a specific and available sub-block. When using sub-block targeting, GKE creates the node pool if at least one VM is healthy. Incremental provisioning helps ensure that all nodes are placed within the specified sub-block.
Block
To retrieve the name of the block in a reservation and the count of available sub-blocks in the block, complete the following steps in the View the topology and health status of All Capacity Mode reservations document:
Identify the name of the block by listing all reservation blocks and copying the value in the
name:field. This value is the name of the block orBLOCK_NAMEin this document.Determine how many node pools to create by describing a reservation block and identifying the value in the
reservationSubBlockCountfield. This value is the number of sub-blocks available. For example, thereservationSubBlockCount: 4value indicates that the block has four sub-blocks available, and you need to create four separate node pools.
Set the reservation path:
export RESERVATION_PATH="projects/PROJECT_ID/reservations/RESERVATION_NAME/reservationBlocks/BLOCK_NAME"Replace the following:
RESERVATION_NAME: the name of your TPU reservation.BLOCK_NAME: the name of the block.
Create a node pool for each sub-block identified in the preceding step. For example, if the count is
4, run this command four times. Use a unique name for each node pool.gcloud container node-pools create NODE_POOL_NAME \ --cluster=CLUSTER_NAME \ --node-locations=ZONE \ --machine-type=tpu7x-standard-4t \ --num-nodes=16 \ --placement-policy=WORKLOAD_POLICY_NAME \ --reservation-affinity=specific \ --reservation=${RESERVATION_PATH}Replace the following:
NODE_POOL_NAME: the name of your new node pool.CLUSTER_NAME: the name of your GKE cluster.WORKLOAD_POLICY_NAME: the name of the workload policy you created.ZONE: the zone for the node pool, for example,us-central1-a.
Sub-block
To retrieve the name of the block and the IDs of the available sub-blocks, complete the following steps in the View the topology and health status of All Capacity Mode reservations document:
To identify the name of the block, list all reservation blocks and copy the value in the
name:field. This value is the name of the block orBLOCK_NAMEon this document.To identify the name of the sub-blocks, list all sub-blocks of a block and copy the value in the
name:field for each entry underreservationSubBlocks. This value is the name of the sub-block orSUBBLOCK_NAMEin this document.
Set the reservation path:
export RESERVATION_PATH="projects/PROJECT_ID/reservations/RESERVATION_NAME/reservationBlocks/BLOCK_NAME/reservationSubBlocks/SUBBLOCK_NAME"Replace the following:
RESERVATION_NAME: the name of your TPU reservation.BLOCK_NAME: the name of the block.SUBBLOCK_NAME: the name of the sub-block.
Create the node pool:
gcloud container node-pools create NODE_POOL_NAME \ --project=PROJECT_ID \ --cluster=CLUSTER_NAME \ --node-locations=ZONE \ --machine-type=tpu7x-standard-4t \ --num-nodes=16 \ --placement-policy=WORKLOAD_POLICY_NAME \ --reservation-affinity=specific \ --reservation=${RESERVATION_PATH}Replace the following:
NODE_POOL_NAME: a unique name for your new node pool, for example,sub-block-pool-1.PROJECT_ID: your Google Cloud project ID.CLUSTER_NAME: the name of your GKE cluster.ZONE: the zone for the node pool, for example,us-central2-b.WORKLOAD_POLICY_NAME: the name of the workload policy you created.
At this stage, the nodes are created, but their Inter-Chip Interconnect (ICI) links are not yet active. Therefore, you can't run workloads on these node pools directly.
To enable all the necessary ICI links to form the slice and allow workloads to be scheduled, create a dynamic slice by using one of the following methods:
- Create a Slice custom resource. Instead of Pods, you use a Slice custom resource to define the specified topology, which the slice controller activates.
- Schedule GKE workloads with Kueue and TAS. Kueue automatically handles the creation and deletion of Slice custom resources. Avoid manually modifying Slice custom resources created by Kueue.
Create a dynamic slice with Kueue and TAS
In this section, you schedule GKE workloads with Kueue and TAS.
Install Kueue slice controller
To install the Kueue slice controller, save the following manifest as
slice-controller.yaml:Apply the
slice-controller.yamlmanifest:kubectl apply -f slice-controller.yamlTo configure Kueue for dynamic slicing, save the following manifest as
dynamic-slice-topology.yaml:Apply the
dynamic-slice-topology.yamlmanifest:kubectl apply -f dynamic-slice-topology.yamlIn this manifest, you configure Kueue for dynamic slicing by defining the following resources:
- Ironwood (TPU7x) dynamic slice topology (
superslice-topology): the topology defines the levels Kueue considers when it schedules dynamic slicing workloads. These levels are the following:cloud.google.com/gce-topology-blocklabel: this level is required to understand which sub-blocks belong to which blocks, because only sub-blocks from the same block can form a slice.cloud.google.com/gke-tpu-partition-4x4x4-idlabel: this level represents individual Ironwood (TPU7x) sub-blocks (4x4x4topology).kubernetes.io/hostnamelabel: this level is required to assign Pods to specific VMs and to observe their labels and taints.
- Ironwood (TPU7x) SuperSlice ResourceFlavor (
superslice-rf): the resource flavor for Ironwood (TPU7x) sub-blocks includes thecloud.google.com/gke-tpu-accelerator: tpu7xlabel to match nodes with Ironwood (TPU7x) machines. - SuperSlice AdmissionCheck (
superslice-ac): this admission check tells Kueue not to schedule a workload until the GKE slice controller confirms that the slice has become active. The admission check is first defined and then added to theClusterQueuethat handles dynamic slicing workloads. - ClusterQueue (
cq) and LocalQueue (lq): these fields managegoogle.com/tpuresources. ThecqClusterQueue includes thesuperslice-acadmission check. ThenominalQuotafield forgoogle.com/tpucan be configured in two ways:- Specific quota: set the
nominalQuotafield to match existing capacity for fair-sharing and quota management. - Unlimited quota: set the
nominalQuotafield to a very high value such as"999999", to model unlimited quota. To focus on TAS and dynamic slicing, this configuration bypasses Kueue's quota management functionality.
- Specific quota: set the
- Ironwood (TPU7x) dynamic slice topology (
Define the partition health selection
Beyond standard node health and readiness, GKE exposes the specific state of
each partition shape by using the cloud.google.com/gke-tpu-partition-[shape]-state label
(where [shape] matches the partition ID shape, such as 2x2x1, 2x2x2, 2x2x4, 2x4x4,
or 4x4x4). This label lets GKE account for factors that influence slice
formation, such as the state of TPU links. Dynamic sub-slicing configuration (topologies smaller
than 4x4x4) requires GKE version
1.36.0-gke.3712000 or later.
You can define the value of the partition state label as follows:
HEALTHY: the partition is healthy and fully functional.DEGRADED: the partition's infrastructure is in a degraded state, for example, because of OCS link degradation. The partition can still form a slice, but overall performance might be lower compared to healthy partitions. This state applies only to the top-level4x4x4topology. Smaller topologies don't have a degraded state.UNHEALTHY: the partition is unhealthy and can't form a slice.UNSET: state is undefined due to unsuccessful GKE slice controller initialization.INCOMPLETE: not all nodes within the partition are provisioned.
The Kueue Slice Controller webhook validates if a workload includes a specific partition health requirement. If no preference is indicated, the webhook injects a default node affinity.
The behavior is as follows:
- If a
nodeSelectorornodeAffinitythat targets thecloud.google.com/gke-tpu-partition-[shape]-statelabel is present, it remains unchanged. If no such label configuration exists, the webhook injects the following default node affinity to ensure only available partitions are used:
nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: cloud.google.com/gke-tpu-partition-4x4x4-state operator: In values: - "HEALTHY" - "DEGRADED"
The following section includes examples where the
cloud.google.com/gke-tpu-partition-4x4x4-state label is configured to specify
the different sub-block health configurations.
Run test workloads on dynamic slicing with Kueue
This section describes how to deploy workloads on dynamic slicing with Kueue and TAS. It includes examples that show how to create a dynamic slice workload and a workload consisting of multiple slices. The workloads are submitted as JobSets.
Example 1: Single workload uses a single dynamic slice
The following example describes how to create a workload using a slice with a
4x12x16 topology, which is composed of 12 sub-blocks. The number of Pods was
calculated as: (4 * 12 * 16) / 4 chips per node = 192 Pods.
Save the following manifest as
big-super-slice.yaml:In this manifest, the following annotations tell Kueue the slice characteristics and topology to configure the following:
cloud.google.com/gke-tpu-slice-topology: specifies"4x12x16"as the dynamic slice topology. Requirements for thetpu7xaccelerator topology include the following rules:- For dynamic sub-slicing: you can specify topologies smaller than
4x4x4, such as2x2x1,2x2x2,2x2x4, or2x4x4. These smaller topologies require GKE version 1.36.0-gke.3712000 or later. - For dynamic super-slicing: you can specify topologies that are
equal to or greater than
4x4x4. For dynamic super-slicing configuration, each dimension of the requested topology must be a multiple of four, for example4A x 4B x 4C. - The topology must be a three-dimensional string in the format
AxBxC, for example4x8x8. - The dimensions must be sorted in non-decreasing order: A <= B <= C. For
example,
4x8x4is invalid; it should be4x4x8. - The product of the dimensions (ABC) must not exceed 9,216.
- The largest supported slice topologies can include up to 32 sub-blocks. For
example,
8x16x16with 32 sub-blocks,8x12x20with 30 sub-blocks, or12x12x12with 27 sub-blocks are within the accepted limits.
- For dynamic sub-slicing: you can specify topologies smaller than
cloud.google.com/gke-tpu-accelerator: tpu7x: schedules Pods on on VMs that run Ironwood (TPU7x).kueue.x-k8s.io/queue-name: assigns the JobSet to a Kueue LocalQueue.- The webhook injects the default node affinity to ensure
HEALTHYandDEGRADEDnodes are used.
Apply the
big-super-slice.yamlmanifest:kubectl apply -f big-super-slice.yamlAfter you apply the manifest, Kueue creates a
JobSetnamedbig-super-slice. Kueue then attempts to form a single dynamic slice with a4x12x16topology. After the slice is active, Kueue admits the workload, and the 192 Pods are scheduled on the nodes to form the dynamic slice that runs your workloads.
Example 2: Workload with more than one replica
The following example demonstrates how to create a workload that uses two
dynamic slices, each composed of four sub-blocks targeting only HEALTHY nodes.
Save the following manifest as
two-super-slices.yaml:Apply the
two-super-slices.yamlmanifest:kubectl apply -f two-super-slices.yaml
In this manifest, you set the replicas field to 2 in the replicatedJobs section.
After you apply the manifest, Kueue
attempts to form two separate slices with a 4x8x8 topology. Kueue creates a
dynamic slice for each replica defined in jobset.spec.replicatedJobs[].replicas.
If n replicas are specified, Kueue creates n dynamic slices for the workload
and waits for all slices to become active before admitting the workload.
Monitor the slice
You can see the status of the slice and monitor the slice metrics with GKE system metrics.
Monitor the status of the slice
To check the status of your dynamic slices, run the following command:
kubectl describe slice SLICE_NAME
Replace SLICE_NAME with the name of your slice. The
slice name is typically derived from the JobSet name and replica index. For
Example 1, a slice created by Kueue would have a name similar to
default-jobset-big-super-slice-yyyyy-job-jax-0.
The output is similar to the following:
Name: test-slice
Namespace:
Labels: <none>
Annotations: <none>
API Version: accelerator.gke.io/v1beta1
Kind: Slice
Metadata:
Creation Timestamp: 2026-02-12T23:44:28Z
Finalizers:
accelerator.gke.io/slice-finalizer
Generation: 1
Resource Version: 1770939905695871008
UID: 6dbbfe14-4486-4462-864d-e078d0ca8b5b
Spec:
Partition Ids:
5eae6a4f59d59cf30a9bf49de618eb2b
Topology: 4x4x4
Type: tpu7x
Status:
Conditions:
Last Transition Time: 2026-02-12T23:45:05Z
Message:
Reason: ACTIVE
Status: True
Type: Ready
Last Transition Time: 2026-02-12T23:45:05Z
Message: NodeLabelingCompleted
Reason: NodeLabelIsAdded
Status: True
Type: NodeLabeled
Events: <none>
The slice name adheres to the following rules to ensure compatibility with underlying Compute Engine resource naming conventions:
- Template:
{namespace}-jobset-{jobset.metadata.name}-kueueHash[5-character]-{jobset.spec.replicatedJobs[].name}-sliceIndex. - Length: the name has 49 characters or fewer. The controller appends a hyphen and an 8-character cluster hash to create Compute Engine resource names, which have a 63-character limit.
- Format: the name matches the regular expression
^[a-z]([-a-z0-9]*[a-z0-9])?$. The name has the following characteristics:- Starts with a lowercase letter.
- Contains only lowercase letters, numbers, and hyphens (-).
- Ends with a lowercase letter or a number (it cannot end with a hyphen).
Monitor the metrics of the slice
You can monitor the following GKE system metrics that expose the condition of a slice:
kubernetes.io/accelerator/slice/statekubernetes.io/accelerator/partition/statekubernetes.io/accelerator/slice/deformation_durationskubernetes.io/accelerator/slice/formation_durations
For more information about the metrics, see GKE system metrics.
Clean up
To avoid unexpected charges, delete your slices before deleting node pools.
Delete the JobSet. This action triggers Kueue to delete the associated Slice custom resources.
kubectl delete jobset JOBSET_NAMEReplace
JOBSET_NAMEwith the name of your JobSet, for example,big-super-slice.Delete the TPU node pool:
gcloud container node-pools delete NODE_POOL_NAME \ --cluster=CLUSTER_NAME \ --location=LOCATION
(Optional) Use dynamic slicing with your own scheduler
This document focuses on using Kueue and TAS. However, you can also manage dynamic slicing with your own custom scheduler. If you choose to use a different scheduler, follow the Slice custom resource reference information.
What's next
- Learn more about TPU Cluster Director.
- Learn how to Manage maintenance events with TPUs in All Capacity mode.