Skip to content

Instantly share code, notes, and snippets.

@whereisaaron
Created November 13, 2022 04:11
Show Gist options
  • Save whereisaaron/4b91d3c5f41c3c1c3cab6f5acbed2d96 to your computer and use it in GitHub Desktop.
Save whereisaaron/4b91d3c5f41c3c1c3cab6f5acbed2d96 to your computer and use it in GitHub Desktop.
Get the versions names for AWS EKS Kubernetes node AMIs as listed in releases at https://github.com/awslabs/amazon-eks-ami/releases
#!/bin/bash
set -e -u -o pipefail
#
# Get the versions names for node AMIs as listed in AMI releases
# https://github.com/awslabs/amazon-eks-ami/releases
#
: ${CLUSTER:=${1?"Must specify cluster name"}}
eksctl get nodegroup --cluster=$CLUSTER --output=json \
| jq -r '.[].ImageID' \
| uniq \
| xargs aws ec2 describe-images --image-ids \
| jq -r '.Images[] | .ImageId + "\t" + .ImageLocation'
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment