Skip to content
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

mixed_instances_policy for managed node groups #1547

Closed
v1nc3nt27 opened this issue Aug 26, 2021 · 9 comments
Closed

mixed_instances_policy for managed node groups #1547

v1nc3nt27 opened this issue Aug 26, 2021 · 9 comments

Comments

@v1nc3nt27
Copy link

If I understand correctly, currently it is only possible to specify mixed_instances_policy for self-managed worker groups. For managed node groups, it is only possible to set all instances to either ON_DEMAND or SPOT. As mixed_instances_policy is an option for managed node groups in AWS, it would be a nice feature to add.

@daroga0002
Copy link
Contributor

for self managed workers you can check this example

override_instance_types = ["m5.large", "m5a.large", "m5d.large", "m5ad.large"]

@v1nc3nt27
Copy link
Author

@daroga0002 I'm sorry, I was too unspecific and forgot to mention that I refer to instances_distribution in mixed_instances_policy of worker groups. If I understand correctly, only worker groups can specify this and I was wondering if there is a reason why this is not possible for managed node groups. Currently, I'd have to manually change it for every node group via AWS.

@daroga0002
Copy link
Contributor

I think you can also make it over node groups as here is some code:

instance_types = !each.value["set_instance_types_on_lt"] ? each.value["instance_types"] : null

I dont remember exactly so this require some testing

@v1nc3nt27
Copy link
Author

v1nc3nt27 commented Aug 26, 2021

@daroga0002 Yup, these are the instance types. They are working (at least they are listed on AWS in the node groups). I'm refering to the instances_distribution which is the percentage of SPOT and On-Demand instances you want to launch. If I see correctly, it's only capacity_type that can be chosen and there the valid variables are SPOT and ON_DEMAND but you cannot mix them. Not sure whether there is a reason why this is not possible, because on AWS you can definitely select it for managed node groups.

@daroga0002
Copy link
Contributor

Ok, so mixed capacity type instances seems be not available under Node groups.

Fully AWS managed:
image

delivering own launch template:
image

If you think it is achievable then please feel free to experiment and create some PR.

@v1nc3nt27
Copy link
Author

Yes, it seems it's not available if you add a node group via EKS, but you can do so in the automatically created auto scaling group. This cannot be influenced via terraform? I'm pretty new to this so please excuse my ignorance.

image

image

@daroga0002
Copy link
Contributor

nope, AWS Node groups have own api which on backend is using a AWS autoscaling, but you cannot influence it.

Any changes directly to autoscaling is just a unsupported by AWS hack

There was some similar discussion under #1525

@v1nc3nt27
Copy link
Author

Ah, that's too bad. At this point, I don't want to switch to worker groups so I'll probably manually edit the ASG, I guess. Well, thanks a lot for clarifying it!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants