Skip to content

Commit

Permalink
Bottlerocket nvidia (aws#1331)
Browse files Browse the repository at this point in the history
* Add bottlerocket lookup for nvidia and arm64 AMIs

* Add docs update for bottlerocket amifamily

* Separate GPU and arch checks for bottlerocket

* Remove AWSNeurons check for BR AMI
  • Loading branch information
rothgar authored Feb 12, 2022
1 parent 0518fb3 commit ed9473a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/cloudprovider/aws/ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/preview/AWS/provisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit ed9473a

Please sign in to comment.