-
Notifications
You must be signed in to change notification settings - Fork 1.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
custom NodeConfig passed in via userData doesn't get propagated to the child launch templates that spin off of the parent #1988
Comments
Your MIME document doesn't look right to me. The I assume you're using a launch template that doesn't include an AMI ID, so managed nodegroups is attempting to merge your user data with its own defaults. Something is probably going wrong in that process due to the syntax issues. Managed nodegroups will add a MIME part that contains the bare-minimum
Surrounded by the proper MIME bits. If you want to open an AWS support case we can look into the specifics of your nodegroup 👍 |
ah ok....let me try tinkering with that then. So it sounds like this information is no longer correct? https://aws.amazon.com/blogs/containers/amazon-eks-optimized-amazon-linux-2023-amis-now-available/ It flat out says you will now need to provide, sounds like that's no longer the case? AWS must've automated that part so the customer (me) no longer has to? |
I'll try to get this blog post clarified -- this is referring to a managed nodegroup using a launch template that includes an AMI ID (we usually call this a "custom AMI nodegroup"). In that scenario, MNG does not attempt to merge anything into your user data, you're responsible for providing all the required bits. If your nodegroup doesn't use a launch template, or uses a launch template that doesn't contain an AMI ID, MNG will inject the cluster details into the user data for you. |
ahhhhh ok....we use a custom launch template (due to the need for user data, we install some custom agents), but we do NOT specify an AMI ID, so sounds like it will do all of the NodeConfig for us. Nice! Also, I am now passing this in as my user data:
I just checked the managed node group launch template, and it looks like my change made it's way in there!
Is it supposed to be a separate section at the bottom and not inline merged in? Or does EKS do that all in the background when it initializes a node? |
Hmmm....found these Karpenter docs, which we aren't using but it goes over AL2023 config. So my setup and behavior matches all of this. https://karpenter.sh/docs/concepts/nodeclasses/#al2023-3 So not understanding why it's not applying....I'll keep digging. |
@cartermckinnon so if the child MNG launch template has the correct user data (see above, matches what it should look like if you check the karpenter docs I linked), it is possible this merge is broke? My changes are not making their way into the kubelet config...I even tried other settings, like |
Good question! The I think what's probably happening here is amazon-eks-ami/nodeadm/internal/kubelet/config.go Lines 333 to 340 in 9c6b810
|
nope, I tried setting
Check node's kubelet config file, nothing for I'm fairly certain this nodeConfig thing doesn't work....and yet, I find that hard to believe, as I can't be the first person to try this, lol....so not sure what to think. |
hey @jbilliau-rcd, since your node kubernetes version is if you haven't already you probably want to validate the true config that kubelet's running with. There's a resource endpoint something like |
Thanks Nick! Completely slipped my mind that we used @jbilliau-rcd You can do something like this to check the effective config on a node:
|
@jbilliau-rcd let me know if you think there's still a problem, but I think we were just looking at the wrong config file. Should be working as expected after correcting the MIME syntax. |
hey, yeah swamped past 2 days, I plan on revisiting this Monday and will post an update. Thanks! |
You are correct, it is applying, both |
What happened:
Custom settings under
kubelet
inNodeConfig
don't pass in or work. I'm passing in this as my user data into a custom launch template that I have my managed node groups configured to use:What you expected to happen:
Once I update my managed node groups to use that launch template, EKS then spins up a new, MNG-specific launch template based off that one.
However, as you can see, my custom
config.systemReserved
doesn't get passed in; instead EKS creates it's ownconfig:
block underkubelet:
and just uses that. Thus, I have no way of setting custom settings for my systemReserved or kubeletReserved values, which I want to do to make our nodes a bit more resilient.How to reproduce it (as minimally and precisely as possible):
Try passing in a custom block under
kubelet
....it doesn't carry through to the MNG-created child launch template even though it exists in the parent one created by you.Environment:
The text was updated successfully, but these errors were encountered: