Prerequisites
- Create a Managed Service for Kubernetes cluster and attach at least one GPU node group to it.
- Install kubectl.
- Connect to the cluster by using kubectl.
How to view topology labels in your cluster
View the topology labels on GPU nodes with the following command:
The lower the tier level shared by two nodes, the better the expected communication performance between them. For example, two nodes with the same
topology.nebius.com/tier-1 value are expected to be closer to each other than two nodes that only share the same topology.nebius.com/tier-2 value.
Example output
computeinstance-e00f4wsk77x4vsr58sandcomputeinstance-e00v7g42bam61yqzp3share the sameGPU-CLUSTER-IDandTIER-2values, which means they belong to the same high-speed network domain and the same wider network locality domain. These nodes have differentTIER-1values, which indicates that they belong to different lower-level locality domains.computeinstance-e00tw5jypq4zvfrsrxbelongs to a different GPU cluster and topology hierarchy because all of its topology label values are different.computeinstance-e00nm33x3y9597zzxjdoes not have topology labels. This usually means that the node is not attached to a GPU cluster, or TAS is not enabled.
How to enable topology-aware scheduling
Kueue is used below as an example scheduler. You can also use other schedulers that support TAS, such as Volcano.Steps
Install and configure Kueue
- Install Kueue.
-
Enable TAS:
-
Create a file named
kueue-tas.yamlto configure the Kueue resources:To get the<node_group_ID>, open your Kubernetes cluster in the web console, go to the Node groups tab and copy the node group ID. -
Apply the configuration:
-
Check that the Kueue resources were created:
Schedule workloads with TAS using Kueue
To request TAS, add a topology annotation to the Pod template of your workload.-
Create a file named
job-tas.yamlthat requests TAS for the workload:Replace the following variables:-
<number_of_replicas>: Number of Pods that are running in parallel. -
<annotations_string>: Requested topology constraint. See the following table for available values:In Kueue, a podset represents a group of Pods belonging to the same workload (for example, replicas of a Job).
-
-
Create the Job:
-
Check admission status:
If Kueue does not admit the workload, reduce parallelism, use less restrictive topology constraints or increase available GPU capacity.
InfiniBand and InfiniBand Trade Association are registered trademarks of the InfiniBand Trade Association.