-
-
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
Capacity Rebalance support #1124
Comments
@zeyaddeeb you mention a Launch Template, but your example is showing creating an Auto Scaling group. Can you please share your code so we can help troubleshoot? |
Capacity Rebalance is not a property of a launch template, it is a property of the autoscaling group through. You can create an Auto Scaling group and associate it with a launch template (or multiple launch templates in the latest versions of the SDK). |
Maybe using the wrong terminology, but it would look something like: ...
worker_groups_launch_template = [
{
name = "worker1"
subnets = var.subnet_ids
asg_min_size = 1
asg_desired_capacity = 1
asg_max_size = 1
autoscaling_enabled = true
capacity_relabance = true # desired variable
},
... |
@zeyaddeeb I misunderstood. Thank you for the clarification. |
After reviewing, as of this posting AWS EKS/ECS does not support the Capacity Rebalance feature at this time. |
@AdamTylerLynch When you say Capacity Rebalancing is not supported by EKS, can you elaborate please? I don't understand how a feature on the ASG requires direct support in EKS. We use spot instances managed by EKS and were, like the OP, looking to enable Capacity Rebalance. I enabled it manually for an ASG via the console and it seemed to have the expected effect. When I then went looking for the correct option on this TF module I found my way here. Are you able to clarify what would need to happen in EKS before this feature was available in the module? |
Hi, I would also be interested in adding this to the module. I'm even willing to do a PR for it, but as @petekneller is commented, not sure if I understand why @AdamTylerLynch comments this it is not compatible with EKS. So, my idea of why this feature would be interested is the following one. I have deployed both the Cluster Autoscaler: https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html and the AWS Node Termination Handler: https://github.com/aws/aws-node-termination-handler . In my mind the workflow will be like this:
That should optimize the usage of spot instances. Maybe I'm missing something. As far as I can see, this option is supported by the ASG terraform resource: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#capacity_rebalance . |
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. |
I have issues
I was looking to add capacity rebalance to some worker launch templates and ran into issues:
exampe:
as per this PR: hashicorp/terraform-provider-aws#16127
I'm submitting a...
What is the current behavior?
When adding
capacity_rebalance = true
in the worker launch template will not work since there are no lookup values.If this is a bug, how to reproduce? Please include a code sample if relevant.
What's the expected behavior?
Are you able to fix this problem and submit a PR? Link here if you have already.
Environment details
Any other relevant info
hashicorp/terraform-provider-aws#16127
The text was updated successfully, but these errors were encountered: