Forked from isaccavalcante/eks_addons_compatibility.sh
Created
November 26, 2024 15:21
-
-
Save thiagorider/8a7aa28a7ac7d7a2f6378c780b743674 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # EKS Addons Compatibility Script | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <kubernetes_version>" | |
| exit 1 | |
| fi | |
| k8s_version=$1 | |
| addons=( | |
| "vpc-cni" | |
| "coredns" | |
| "kube-proxy" | |
| "aws-ebs-csi-driver" | |
| "aws-efs-csi-driver" | |
| "aws-mountpoint-s3-csi-driver" | |
| "snapshot-controller" | |
| "adot" | |
| "aws-guardduty-agent" | |
| "amazon-cloudwatch-observability" | |
| "eks-pod-identity-agent" | |
| ) | |
| get_compatible_versions() { | |
| local addon_name=$1 | |
| aws eks describe-addon-versions \ | |
| --addon-name "$addon_name" \ | |
| --kubernetes-version "$k8s_version" \ | |
| --query 'addons[0].addonVersions[*].addonVersion' \ | |
| --output text | |
| } | |
| echo "Latest compatible addon versions for Kubernetes $k8s_version:" | |
| for addon in "${addons[@]}"; do | |
| all_compatible_versions=$(get_compatible_versions "$addon") | |
| latest=$(echo "$all_compatible_versions" | tr '\t' '\n' | head -n 1) | |
| echo "$addon: $latest" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment