[EKS] [request]: CLI support for determining if node group update available.
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
A simple way to determine programmatically if an AMI update is available for an EKS managed node group.
**Which service(s) is this request for?**
EKS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Currently it is very difficult to determine if there is an upgrade available to apply to a managed node group without checking in the management console. We'd like upgrades to our node groups to be automatically applied overnight when our clusters are quiet, which we'd planned to implement as small cronjob that calls `eksctl upgrade nodegroup` for each of our node groups.
While we are aware calling `eksctl upgrade nodegroup` for a node group while there is no update to apply is a no-op we'd like a way of easily determining when an upgrade is available so that we only perform supporting actions (e.g. suspending cluster-autoscaler for the duration of the upgrade) when needed. Currently there is no easy way to determine this. Our ideal solution would look something like `aws eks describe-nodegroup` returning a boolean field signalling if an upgrade was available for the node group.
**Are you currently working around this issue?**
Currently the best workaround we have thought of is:
- Fetch the AMI ID of the latest image by following https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id.html
- Use `aws ec2 describe-image` to get the name of this AMI and extract the date from the name (You could also extract the build date which should be the same)
- Extract the date from the `releaseVersion` of the node group (returned by `aws eks describe-nodegroup`)
- Compare the two dates and if the AMI is a newer date there is an upgrade to apply.
The above method seems quite brittle and liable to fail in future (e.g. if the naming scheme of the AMI changed) so we are unlikely to implement it and just stick with self managed node groups (with terraform to update the AMI when a new version is available) for now.
Contributor guide
Research direction
Start with the requested `aws eks describe-nodegroup` behavior and compare it with the existing `eksctl upgrade nodegroup` workflow. Review the linked EKS AMI retrieval documentation and the workaround involving `aws ec2 describe-image`. Done means providing a reliable programmatic indication that a managed node group update is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- api, cli, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100