diff --git a/pkg/cloudprovider/aws/ami.go b/pkg/cloudprovider/aws/ami.go index 0b507fb424dc..a56bafe0f5d8 100644 --- a/pkg/cloudprovider/aws/ami.go +++ b/pkg/cloudprovider/aws/ami.go @@ -108,10 +108,14 @@ func (p *AMIProvider) getAL2Alias(version string, instanceType cloudprovider.Ins // getBottlerocketAlias returns a properly-formatted alias for a Bottlerocket AMI from SSM func (p *AMIProvider) getBottlerocketAlias(version string, instanceType cloudprovider.InstanceType) string { arch := "x86_64" + amiSuffix := "" + if !instanceType.NvidiaGPUs().IsZero() { + amiSuffix = "-nvidia" + } if instanceType.Architecture() == v1alpha5.ArchitectureArm64 { arch = instanceType.Architecture() } - return fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s/%s/latest/image_id", version, arch) + return fmt.Sprintf("/aws/service/bottlerocket/aws-k8s-%s%s/%s/latest/image_id", version, amiSuffix, arch) } // getUbuntuAlias returns a properly-formatted alias for an Ubuntu AMI from SSM diff --git a/website/content/en/preview/AWS/provisioning.md b/website/content/en/preview/AWS/provisioning.md index d91ef0745451..4b63a67e705f 100644 --- a/website/content/en/preview/AWS/provisioning.md +++ b/website/content/en/preview/AWS/provisioning.md @@ -154,7 +154,7 @@ spec: The AMI used when provisioning nodes can be controlled by the `amiFamily` field. Based on the value set for `amiFamily`, Karpenter will automatically query for the appropriate [EKS optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-amis.html) via AWS Systems Manager (SSM). -Currently, Karpenter supports `amiFamily` values `al2`, `bottlerocket`, and `ubuntu`. GPUs are only supported with `al2`. +Currently, Karpenter supports `amiFamily` values `al2`, `bottlerocket`, and `ubuntu`. GPUs are only supported with `al2` and `bottlerocket`. Note: If a custom launch template is specified, then the AMI value in the launch template is used rather than the `amiFamily` value.