-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[aws-eks] wrong order of cluster.awsAuth.addMastersRole & cluster.addNodegroup breaks awsAuth #7595
Comments
Thanks for reporting! |
I believe this is because we don't do the AwsAuth for managed ng and let the eks control plane do it instead. So the state will be inconsistent. aws-cdk/packages/@aws-cdk/aws-eks/lib/managed-nodegroup.ts Lines 266 to 267 in a732d14
Maybe we still should do it for manage nodegroups? Let me try add this logic? |
I see. Yes. I think we must also do it for Managed Node Groups or otherwise we will lose track of the state. |
@eladb OK. Let me create the PR. |
…terRole (#8901) fix(eks): missing nodegroup identity in aws-auth after awsAuth.addMasterRole This PR adds the state tracking by `awsAuth.addRoleMapping` for the managed nodegroups Fixed: #7595 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
If you execute the cluster.awsAuth.addMastersRole & cluster.addNodegroup calls in the wrong order you end up with an awsAuth configmap in your cluster that misses the rolemapping for the node group role. The result of this is that the nodes in the nodegroup can't connect to the apiserver and the cluster is broken.
Reproduction Steps
Error Log
expected result from kubectl -n kube-system get configmap aws-auth -o yaml
actual result from kubectl -n kube-system get configmap aws-auth -o yaml
Please note that the formatting looks strange, but more importantly the system:bootstrappers & system:nodes groups are missing for the nodegroup role
Environment
Other
Changing the order of executing the cluster.awsAuth.addMastersRole & cluster.addNodegroup methods leads to the desired result:
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: