Configure notification for new/updates available for AWS EKS Add-ons

Cloud Guy
2 min readJan 5, 2022

--

EKS Add-ons

Not going much deeper into what is add-ons for the EKS, as add-ons are very specific to AWS EKS cluster & those who are already familiar with AWS EKS, should already be knowing about add-ons.

What is more challenging is to keep a tab on the versions of the Add-ons installed in the EKS cluster, as AWS time to time adds newer versions for each add-ons & also add fresh new add-ons to be deployed into the EKS cluster. As a cluster admin, its highly desired that notifications/alerts should be received as & when new/updates available for AWS EKS Add-ons.

New add-ons available:

The solution I have proposed is using the AWS cli. One should have basic knowledge about the AWS cli before attempting the solution mentioned below.

Extract the available addons in general:

aws eks — region us-east-2 describe-addon-versions — kubernetes-version 1.21 | jq ‘.addons[].addonName’

The response can be:

“kube-proxy”
“vpc-cni”
“coredns”
“aws-ebs-csi-driver”

Extract the addons installed already for the concerned EKS Cluster

aws eks — region us-east-2 list-addons — cluster-name parts-eks-cluster | jq ‘.addons[]’

The response can be:

“kube-proxy”
“vpc-cni”
“coredns”

Then compare both the outputs to find the missing addons & send notification.

New versions available for the installed add-ons

The solution I have proposed is using the AWS cli. One should have basic knowledge about the AWS cli before attempting the solution mentioned below.

Extract the addons installed already for the concerned EKS Cluster

aws eks — region us-east-2 list-addons — cluster-name parts-eks-cluster | jq ‘.addons[]’

The response can be:

“kube-proxy”
“vpc-cni”
“coredns”

Now for each installed add-ons get the installed version

aws eks — region <AWS REGION> describe-addon — cluster-name <EKS_CLUSTER_NAME>— addon-name coredns | jq ‘.addon.addonVersion’

The response can be:

“v1.8.4-eksbuild.1”

Now for the same add-ons get the latest version available from AWS

aws eks — region <AWS REGION> describe-addon-versions — kubernetes-version <KUBERNETES VERSION e.g 1.21> — addon-name coredns | jq ‘.addons[].addonVersions[] | select(.compatibilities[].defaultVersion == true) | .addonVersion’

The response can be:

“v1.8.4-eksbuild.1”

If both versions matches, we are good with this add-ons & lets move to the next add-ons.

Like this we can check all the add-ons & anywhere there is mismatch, notification can be triggered.

These entire solution can be written in a bash script & run it through a VM/jump server on a specific interval (through cron) & all the cluster admins will get alerts/notifications as & when there is a new add-ons available from AWS & also new newer versions are available for the installed add-ons.

--

--

Cloud Guy
Cloud Guy

No responses yet