-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
EKS Auto Mode - add access entry for auto mode node role #3241
Comments
Thanks for finding this, I was wondering why this wasn't being created. I was having a lot of trouble figuring out why this wasn't happening unless I made a built in NodePool, which I don't use any either in my cluster. |
if you are not using the built in nodepools, you will need to create an access entry of type We won't be able to support this in the module since it will cause conflicts. the easiest path would be to enable the |
hmm, okay. I was trying to avoid using the builtin nodepools because I'm also using a custom NodeClass to add extra security groups onto my instances. here's the terraform that got me going
|
Disregard, you do need the policy association per the docs
|
@bryantbiggs @antonbabenko if i dont put any pools or role (which i cant point to the role automaticly created) it doesnt make sense creating the role but not assigning it, even if i create the nodepools after i would expect the role to be attached to the cluster as a different access policy resource I can make a PR that will either not create the iam role - with node pools is 0 |
When you use one of the built-in EKS Auto Mode Node Pools, either general-purpose or system, EKS Auto Mode will automatically create & associate an access entry for that node role. Hope this clears it. |
@erezzarum thanks for the answer |
No, that will only cause conflicts because an association will exist in most of the cases |
@bryantbiggs |
No, you are missing the point. It's not a terraform problem |
@bryantbiggs if its not possible, maybe this should be added to the readme? that if no node pools are selected users should attach them differntly? |
You can't use EKS Auto Mode with a built-in NodePool (general-purpose, system) without giving a Role. I recommend you will try and use EKS Auto Mode from the console to understand what i wrote here, it will make sense. |
@erezzarum i will update my terraform to create another association if that’s the case from you guys also, you have an awesome name 😁 |
There are two roles here, you have the cluster role and a node role. Great name indeed :) |
Could you clarify how this can be implemented? I've setup a cluster using the below and hit an error related to the aws_eks_access_entry of value EC2 already being taken by the default node pools. On the other hand if I leave the node_pools list empty or omit it, the cluster ends up non functional.
|
@andromeda306 |
Hmm so my follow up question would be how and at what point are you
creating the custom node pools and node classes. I’ve noticed if I don’t
include the default, nodeclass and nodepool then the cluster does not
create successfully.
…On Thu, 16 Jan 2025 at 17:14, Erez Tamam ***@***.***> wrote:
@andromeda306 <https://github.com/andromeda306>
if you are using default node pools - dont assign access policy
if you dont use default node pools - assign access policy
if you create a cluster with default node pools and no custom and then
remove the default node pool - dont assign access policy
—
Reply to this email directly, view it on GitHub
<#3241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXTBWJYBY4E6DAO7IRPJG32K7LHDAVCNFSM6AAAAABTST3KFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJWGE2DCNBVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
@andromeda306 the best option - is to create your own role besides the module it self just put - create node iam role false in the module so it wont be created |
No I understand that part, I’m just curious as to how others are running
the setup because I’ve had a lot of difficulties trying to customise the
auto mode setup. I’m wondering whether it’s because I’m using the eks
module which only has two available parameters in the config.
…On Thu, 16 Jan 2025 at 19:35, Erez Tamam ***@***.***> wrote:
@andromeda306 <https://github.com/andromeda306>
well the nodepool is for your node size and type for example
t2large,t2xlarge
the nodeclass is what image you run or what role you want
the best option - is to create your own role besides the module it self
and when you create the nodeclass you should use the role you created
just put - create node iam role false in the module so it wont be created
—
Reply to this email directly, view it on GitHub
<#3241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXTBWOZNQH6I5AQD44QKVD2K73YXAVCNFSM6AAAAABTST3KFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJWGQZTONBXHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
There isn't anything to customize within this module with respect to Auto Mode. The API gives you the ability to:
Thats it. Any customizations of sorts will come by users providing their own node classes and node pools, and with that, they will need to supply the IAM role that will be used by the nodes created. tl;dr - there isn't anything to customize in this model for Auto Mode, its just an opt-in, or opt-out. Customizations will happen through users implementing their own node pools and node classes which are not managed by this module |
I was able to sort this out in the end - thanks for the push in the right direction.
|
@andromeda306 |
I know this issue is closed now but it would be nice if the access entry configuration was officially documented somewhere like the example directory. My org has tagging requirements on all EC2 instances so the built in node pool and node class can't be enabled. This configuration is very specific to EKS auto given the Also in case anyone else runs into this: do not modify the built in nodeclass or nodepools. Your config will appear to work until it is overwritten by AWS. |
Description
When using built-in nodepools, EKS will automatically create appropriate access entry for the Node role.
When not using any built-in nodepools, one will not be created and the NodeClass will fail, as Node role is not authorized to join nodes to the cluster.
Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]: 20.31.3
Terraform version: 1.7.3
Reproduction Code [Required]
Steps to reproduce the behavior:
Create an EKS Auto Mode cluster without using any built-in nodepools.
Expected behavior
EKS module will create the correct access entries.
Example with CLI
Actual behavior
Create access entries for node role.
Terminal Output Screenshot(s)
Additional context
The text was updated successfully, but these errors were encountered: