AWS EKS - Get available Kubernetes versions

6/19/2021

I am looking for a programmatic way to get available Kubernetes versions in AWS EKS. Something similar to the following Azure CLI command:

az aks get-versions --location eastus --output table
-- Eric Hemmerlin
amazon-eks
amazon-web-services
kubernetes

2 Answers

3/12/2022

As mentioned earlier, there is no API that explicitly returns the list of available Kubernetes versions available in AWS EKS. However, there is a somewhat hacky way to get this by describing all add-on versions available and getting the K8s versions they are compatible with.

I guess it would be a fair assumption that all available K8s versions in EKS would be compatible with some add-on or the other. In which case, the below CLI command will return the list of available Kubernetes versions present in EKS which can be used.

aws eks describe-addon-versions | jq -r ".addons[] | .addonVersions[] | .compatibilities[] | .clusterVersion" | sort | uniq

The command gets all Add-ons for EKS and each Add-ones compatible version and then uses jq utility to get the unique Kubernetes versions.

-- kumar harshit
Source: StackOverflow

6/19/2021

Is this what you are looking for?

aws eks describe-cluster --name CLUSTER_NAME --region eu-west-2 --query 'cluster.version'
-- QGA
Source: StackOverflow