[EKS] [request]: managed nodes inconsistently managing access (eks iam auth)
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The EKS managed nodes capability inconsistently manages IAM access for nodes. When you add a managed node group if the access entry doesn't exist it will create the access entry. If you delete all managed node groups using that access entry it doesn't remove it. This can lead to a situation where if you delete the iam role associated and then recreated everything with the same name it'll fail to join nodes to the cluster (because the access entry must be deleted/re-created).
## Suggestions
1. Consider making the auto-management of resources an advanced option at the cluster level.
a. I'm assuming you did the create action to help customers onboard more easily. Perhaps consider auto-removal action in the future when there are no longer node groups utilizing the associated IAM role (in an effort to be consistent).
b. You already do this, but I'm just stating it. Allow advanced users to manage this manually (via api / IaC tools) when auto-management is disabled.
2. Consider extending the existing solution so that the auto-addition of the access entry allows for a new iam role (with it's own unique id) to be added in addition to the one that's already there. The access entry list will instead display the full ARN for the cluster + role + unique id (not just the arn to the role).
3. Add some sort of health checks to access entries to identify and alert when they are no longer valid due to removed resources.
Contributor guide
Research direction
Start by reviewing the EKS managed node group and IAM access-entry behavior described in the issue. Compare the current creation and deletion lifecycle, then determine which of the three suggested directions is intended; done should prevent stale or conflicting access entries when node groups and IAM roles are removed or recreated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- authentication, cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100