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

[Feature Request] Spot for Managed Node Groups #1107

Closed
1 of 4 tasks
psoares opened this issue Nov 18, 2020 · 13 comments
Closed
1 of 4 tasks

[Feature Request] Spot for Managed Node Groups #1107

psoares opened this issue Nov 18, 2020 · 13 comments

Comments

@psoares
Copy link

psoares commented Nov 18, 2020

I have issues

The documentation shows an example of how to create a spot fleet using a workergroup launch template.

Is it possible to do the same as a nodeGroup instead ?

I'm submitting a...

  • bug report
  • feature request
  • support request - read the FAQ first!
  • kudos, thank you, warm fuzzy

What is the current behavior?

The documentation shows how to create a spot fleet using launch templates.

worker_groups_launch_template = [
    {
      name                    = "spot-1"
      override_instance_types = ["m5.large", "m5a.large", "m5d.large", "m5ad.large"]
      spot_instance_pools     = 4
      asg_max_size            = 5
      asg_desired_capacity    = 5
      kubelet_extra_args      = "--node-labels=node.kubernetes.io/lifecycle=spot"
      public_ip               = true
    },
  ]

What's the expected behavior?

I'd like to have a nodegroup that manages a spot fleet instead, so it appears in the EKS console or when I do aws eks list-nodegroups

Environment details

  • Affected module version: 13.1.0
  • OS: Linux
  • Terraform version: 0.13.5
@barryib
Copy link
Member

barryib commented Nov 19, 2020

This is not yet available in EKS. AWS is working on it. From aws/containers-roadmap#583, it sounds like the feature is coming soon.

@barryib barryib changed the title Spot Nodegroups [Feature Request] Spot for Managed Node Groups Nov 19, 2020
@lifelofranco
Copy link

Updating that spot for managed node groups has just been released! Would be cool if this gets supported.

Here's the blog post: https://aws.amazon.com/blogs/containers/amazon-eks-now-supports-provisioning-and-managing-ec2-spot-instances-in-managed-node-groups/

@psoares
Copy link
Author

psoares commented Dec 2, 2020

I've tweaked the module locally and think I could propose a change.
It would involve the following:

@antonbabenko let me know if you'd like me to submit a PR.

@pre
Copy link

pre commented Dec 4, 2020

FWIW, it seems that if you're using a Launch Template (custom userdata) and a Managed Node Group, you still can't request Spot instances that way.

@njtman
Copy link

njtman commented Dec 4, 2020

FWIW, it seems that if you're using a Launch Template (custom userdata) and a Managed Node Group, you still can't request Spot instances that way.

I'm on the latest version of the aws provider 3.20.0 and I was able to launch spot instances using a aws_eks_node_group resource and a aws_launch_teamplate resource. That said, I didn't try setting a custom user data script.

@pre
Copy link

pre commented Dec 5, 2020

Was it a pool of mixed spot & ondemand? I realised my experience is about a mixed pool of both in the same node group.

@njtman
Copy link

njtman commented Dec 5, 2020

Was it a pool of mixed spot & ondemand? I realised my experience is about a mixed pool of both in the same node group.

I only tried with spot. For what it's worth, an eks managed node group can either have a capacity type of spot or ondemand. From the docs

Capacity type – Select a capacity type. For more information about choosing a capacity type, see Managed node group capacity types. You cannot mix different capacity types within the same node group. If you want to use both capacity types, create separate node groups, each with their own capacity and instance types.

Source https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html

@johnnydimas
Copy link

Excited about using spot on managed node groups. Would be great to be able to configure this using this module soon!

@joelfogue
Copy link

I'm kinda stuck at this point as well; I'd love to be able to setup managed nodegroups with SPOT. Any idea when we might get a PR on this? I'd like to help contribute as well as soon as I'm comfortable with golang!

@psoares
Copy link
Author

psoares commented Dec 22, 2020 via email

@psoares
Copy link
Author

psoares commented Jan 21, 2021

Sorry. Closed by mistake. Reopened.

@barryib
Copy link
Member

barryib commented Jan 28, 2021

Closing since #1129 is now merged and v14.0.0 shipped.

Thank you all for your contributions and for your patience.

@barryib barryib closed this as completed Jan 28, 2021
@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 23, 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

7 participants