Getting started with Amazon EKS support in SageMaker HyperPod
In addition to the general Prerequisites for using SageMaker HyperPod for SageMaker HyperPod, check the following requirements and considerations for orchestrating SageMaker HyperPod clusters using Amazon EKS.
You can set up resources configuration for creating SageMaker HyperPod clusters using the AWS Management Console and CloudFormation. For more information, see Creating a SageMaker HyperPod cluster with Amazon EKS orchestration and Creating SageMaker HyperPod clusters using CloudFormation templates.
Requirements
Before creating a HyperPod cluster, you need a running Amazon EKS cluster configured with VPC and installed using Helm.
-
If using the SageMaker AI console, you can create an Amazon EKS cluster within the HyperPod cluster console page. For more information, see Creating a SageMaker HyperPod cluster with Amazon EKS orchestration.
-
If using AWS CLI, you should create an Amazon EKS cluster before creating a HyperPod cluster to associate with. For more information, see Create an Amazon EKS cluster in the Amazon EKS User Guide.
When provisioning your Amazon EKS cluster, consider the following:
-
Kubernetes version support
-
SageMaker HyperPod supports Kubernetes versions 1.31, 1.32, 1.33, 1.34, 1.35, 1.36, and 1.37.
-
-
Amazon EKS cluster authentication mode
-
The authentication mode of an Amazon EKS cluster supported by SageMaker HyperPod are
APIandAPI_AND_CONFIG_MAP.
-
-
Networking
-
SageMaker HyperPod requires the Amazon VPC Container Network Interface (CNI) plug-in version 1.18.3 or later. To use Increasing pods per node with dynamic ENI attachment, you need version
v1.23.3-eksbuild.1or later.NoteAWS VPC CNI plugin for Kubernetes
is the only CNI supported by SageMaker HyperPod. -
The type of the subnet in your VPC must be private for HyperPod clusters.
-
To move nodes between two clusters, the clusters must share a VPC and subnet. A cluster's VPC cannot change after you create it, so plan your cluster networking accordingly. For more information, see Move nodes between instance groups and clusters.
-
-
IAM roles
-
Ensure the necessary IAM roles for HyperPod are set up as guided in the AWS Identity and Access Management for SageMaker HyperPod section.
-
-
Amazon EKS cluster add-ons
-
You can continue using the various add-ons provided by Amazon EKS such as Kube-proxy, CoreDNS, the Amazon VPC Container Network Interface (CNI) plugin, Amazon EKS pod identity, the GuardDuty agent, the Amazon FSx Container Storage Interface (CSI) driver, the Mountpoint for Amazon S3 CSI driver, the AWS Distro for OpenTelemetry, and the CloudWatch Observability agent.
ImportantDo not install a CSI driver that manages NVMe instance storage (sometimes called a Local Instance Storage CSI driver) on HyperPod nodes that use the SageMaker HyperPod AMI. The AMI configures an LVM volume group (
vg.01) on the NVMe instance store at boot, before the CSI driver starts, and a CSI driver that targets the same NVMe devices will conflict with this configuration and cause I/O failures. The Amazon EBS CSI driver, the Amazon FSx CSI driver, the Amazon EFS CSI driver, and the Mountpoint for Amazon S3 CSI driver are not affected because they do not manage local NVMe instance storage. For details and remediation steps, see the Considerations section in Using the Amazon EBS CSI driver on SageMaker HyperPod EKS clusters.
-
Considerations for configuring SageMaker HyperPod clusters with Amazon EKS
-
You must use distinct IAM roles based on the type of your nodes. For HyperPod nodes, use a role based on IAM role for SageMaker HyperPod. For Amazon EKS nodes, see Amazon EKS node IAM role.
-
You can provision and mount additional Amazon EBS volumes on SageMaker HyperPod nodes using two approaches: use InstanceStorageConfigs for cluster-level volume provisioning (available when creating or updating instance groups), or use the Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver for dynamic pod-level volume management. With InstanceStorageConfigs, set the local path
to /opt/sagemakerto properly mount the volumes to your Amazon EKS pods. For information about how to deploy the Amazon EBS CSI controller on HyperPod nodes, see Using the Amazon EBS CSI driver on SageMaker HyperPod EKS clusters. To use NVMe instance storage on HyperPod, rely on the AMI's built-in LVM configuration through/opt/sagemakerrather than installing a separate NVMe-targeting CSI driver. -
If you use instance-type labels to define scheduling constraints, ensure that you use the SageMaker AI ML instance types prefixed with
ml.. For example, for P5 instances, useml.p5.48xlargeinstead ofp5.48xlarge.
Considerations for configuring network for SageMaker HyperPod clusters with Amazon EKS
-
The Amazon VPC CNI attaches more elastic network interfaces (ENIs) to each HyperPod cluster instance as it needs them. For more information, see Increasing pods per node with dynamic ENI attachment. The following table lists the maximum number of pods per instance type. These values apply to nodes that run the updated HyperPod AMI with Amazon VPC CNI
v1.23.3-eksbuild.1or later. Nodes that are not updated keep the previous one-ENI limit.Instance type Max number of pods ml.p4d.24xlarge 250 ml.p4de.24xlarge 250 ml.p5.48xlarge 51 ml.trn1.32xlarge 198 ml.trn1n.32xlarge 198 ml.g5.xlarge 44 ml.g5.2xlarge 44 ml.g5.4xlarge 110 ml.g5.8xlarge 205 ml.g5.12xlarge 250 ml.g5.16xlarge 205 ml.g5.24xlarge 250 ml.g5.48xlarge 250 ml.c5.large 20 ml.c5.xlarge 44 ml.c5.2xlarge 44 ml.c5.4xlarge 110 ml.c5.9xlarge 205 ml.c5.12xlarge 205 ml.c5.18xlarge 250 ml.c5.24xlarge 250 ml.c5n.large 20 ml.c5n.2xlarge 44 ml.c5n.4xlarge 110 ml.c5n.9xlarge 205 ml.c5n.18xlarge 250 ml.m5.large 20 ml.m5.xlarge 44 ml.m5.2xlarge 44 ml.m5.4xlarge 110 ml.m5.8xlarge 205 ml.m5.12xlarge 205 ml.m5.16xlarge 250 ml.m5.24xlarge 250 ml.t3.medium 12 ml.t3.large 24 ml.t3.xlarge 44 ml.t3.2xlarge 44 ml.g6.xlarge 44 ml.g6.2xlarge 44 ml.g6.4xlarge 110 ml.g6.8xlarge 205 ml.g6.12xlarge 205 ml.g6.16xlarge 250 ml.g6.24xlarge 250 ml.g6.48xlarge 250 ml.gr6.4xlarge 110 ml.gr6.8xlarge 205 ml.g6e.xlarge 44 ml.g6e.2xlarge 44 ml.g6e.4xlarge 110 ml.g6e.8xlarge 205 ml.g6e.12xlarge 250 ml.g6e.16xlarge 250 ml.g6e.24xlarge 250 ml.g6e.48xlarge 250 ml.p5e.48xlarge 51 ml.p6-b300.48xlarge 149 ml.r5d.16xlarge 250 ml.g7e.2xlarge 110 ml.g7e.4xlarge 110 ml.g7e.8xlarge 250 ml.g7e.12xlarge 250 ml.g7e.24xlarge 250 ml.g7e.48xlarge 250 ml.g4dn.xlarge 20 ml.g4dn.2xlarge 20 ml.g4dn.4xlarge 20 ml.g4dn.8xlarge 44 ml.g4dn.12xlarge 205 ml.g4dn.16xlarge 44 ml.c6g.medium 5 ml.c6g.large 20 ml.c6g.xlarge 44 ml.c6g.2xlarge 44 ml.c6g.4xlarge 110 ml.c6g.8xlarge 205 ml.c6g.12xlarge 205 ml.c6g.16xlarge 250 ml.c7g.medium 5 ml.c7g.large 20 ml.c7g.xlarge 44 ml.c7g.2xlarge 44 ml.c7g.4xlarge 110 ml.c7g.8xlarge 205 ml.c7g.12xlarge 205 ml.c7g.16xlarge 250 ml.c8g.medium 5 ml.c8g.large 20 ml.c8g.xlarge 44 ml.c8g.2xlarge 44 ml.c8g.4xlarge 110 ml.c8g.8xlarge 205 ml.c8g.12xlarge 205 ml.c8g.16xlarge 250 ml.c8g.24xlarge 250 ml.c8g.48xlarge 250 ml.c6a.large 20 ml.c6a.xlarge 44 ml.c6a.2xlarge 44 ml.c6a.4xlarge 110 ml.c6a.8xlarge 205 ml.c6a.12xlarge 205 ml.c6a.16xlarge 250 ml.c6a.24xlarge 250 ml.c6a.32xlarge 250 ml.c6a.48xlarge 250 ml.m6a.large 20 ml.m6a.xlarge 44 ml.m6a.2xlarge 44 ml.m6a.4xlarge 110 ml.m6a.8xlarge 205 ml.m6a.12xlarge 205 ml.m6a.16xlarge 250 ml.m6a.24xlarge 250 ml.m6a.32xlarge 250 ml.m6a.48xlarge 250 ml.m6g.medium 5 ml.m6g.large 20 ml.m6g.xlarge 44 ml.m6g.2xlarge 44 ml.m6g.4xlarge 110 ml.m6g.8xlarge 205 ml.m6g.12xlarge 205 ml.m6g.16xlarge 250 ml.m7g.medium 5 ml.m7g.large 20 ml.m7g.xlarge 44 ml.m7g.2xlarge 44 ml.m7g.4xlarge 110 ml.m7g.8xlarge 205 ml.m7g.12xlarge 205 ml.m7g.16xlarge 250 ml.m8g.medium 5 ml.m8g.large 20 ml.m8g.xlarge 44 ml.m8g.2xlarge 44 ml.m8g.4xlarge 110 ml.m8g.8xlarge 205 ml.m8g.12xlarge 205 ml.m8g.16xlarge 250 ml.m8g.24xlarge 250 ml.m8g.48xlarge 250 -
Only Pods with
hostNetwork = truehave access to the Amazon EC2 Instance Metadata Service (IMDS) by default. Use the Amazon EKS Pod identity or the IAM roles for service accounts (IRSA) to manage access to the AWS credentials for Pods. -
EKS-orchestrated HyperPod clusters support dual IP addressing modes, allowing configuration with IPv4 or IPv6 for IPv6 Amazon EKS clusters in IPv6-enabled VPC and subnet environments. For more information, see Setting up SageMaker HyperPod with a custom Amazon VPC.
Considerations for using the HyperPod cluster resiliency features
-
Node auto-replacement is not supported for CPU instances.
-
The HyperPod health monitoring agent needs to be installed for node auto-recovery to work. The agent can be installed using Helm. For more information, see Installing packages on the Amazon EKS cluster using Helm.
-
The HyperPod deep health check and health monitoring agent supports GPU and Trn instances.
-
SageMaker AI applies the following taint to nodes when they are undergoing deep health checks:
effect: NoSchedule key: sagemaker.amazonaws.com/node-health-status value: UnschedulableNoteYou cannot add custom taints to nodes in instance groups with
DeepHealthChecksturned on.
Once your Amazon EKS cluster is running, configure your cluster using the Helm package manager as instructed in Installing packages on the Amazon EKS cluster using Helm before creating your HyperPod cluster.