<p>I am looking for a programmatic way to get available Kubernetes versions in AWS EKS. Something similar to the following Azure CLI command:</p>
<pre><code>az aks get-versions --location eastus --output table
</code></pre>

<p>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.</p>
<p>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.</p>
<pre><code>aws eks describe-addon-versions | jq -r &quot;.addons[] | .addonVersions[] | .compatibilities[] | .clusterVersion&quot; | sort | uniq
</code></pre>
<p>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.</p>
