- Install jq if you don’t have it on your system.
-
Get your cluster ID which is returned in the
.metadata.idfield of the cluster resource.
NB_K8S_CLUSTER_ID.
To move your workload:
-
Create a node group.
For example, the following command creates a group of two nodes, each with one NVIDIA H100 GPU, and all drivers and components required for the GPU:
-
Export to an environment variable the name of the node group from which you want to move the workload. For example, you can get it by the node group’s name (if you have set and know it) and the parent cluster’s ID:
-
Get the list of node names in the node group from which you want to move the workload:
-
Cordon off the old nodes so that no new pods are scheduled on them:
-
Drain the old nodes so that the existing pods can be evicted from them:
Kubernetes will automatically move evicted pods to suitable nodes.
-
Delete the old node group: