[EKS] [request]: Spot instances for managed node groups
Tell us about your request Right now we can use on-demand instances in a managed node worker group. However I see no reference in the documentation to using spot instances or a spot fleet. Ideally, I would like to be able to use spot instances for my batch workloads.
Which service(s) is this request for? EKS
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? I want to run batch workloads cost efficiently. We mostly use spot instances for this. Without this feature I can't take advantage of the nice managed draining and upgrading support of the managed worker node groups.
Are you currently working around this issue? Creating our own autoscaling groups and manually doing a rolling upgrade using kubectl cordon and drain commands.
Additional context No
Attachments None
Update 12/1 – this feature is now available
Thanks for adding this! We're working on this feature and its been part of our plan for managed nodes from the start.
Question: Would you expect to provision a spot node group with a single instance type or multiple instance types?
@tabern Thanks for the quick answer! As to your question I would expect to be able to specify multiple instance types. At the moment we use launch template to specify multiple instance types and let it choose automatically. Providing the same support would be great. The reason we choose multiple instance types is resiliency, if one of those instance types is not available we can automatically switch.
How about the new Fargate Spot option on EKS?
How about the new Fargate Spot option on EKS?
I assume you are also talking about this announcement, however this just means you're running pods on fargate orchestrated by EKS, which is still quite expensive compared to running actual nodes, and does not integrate with typical k8s tooling such as EFK, Prometheus+Grafana, nginx ingress, cert manager, etc.
I would expect to be able to specify multiple instance types. At the moment we use launch template to specify multiple instance types and let it choose automatically.
@stijndehaes would you expect to add any priority to these instance types or is random sufficient (ie: let cluster autoscaler scale up and we'll hit eventual capacity)? If we did not support multiple instance types per group would it be painful to need to create multiple node groups, some of which were scaled to 0 (and could be scaled up as needed) or would this create undue complexity?
How about the new Fargate Spot option on EKS?
@gjmveloso - that's on our roadmap, tracked as https://github.com/aws/containers-roadmap/issues/622
which is still quite expensive compared to running actual nodes
@gertjangaillet - The cost of Fargate tends to be dependent on cluster utilization. If you're getting very high utilization, Fargate is more expensive than nodes. However, if you typically run with low cluster utilization (50% or much less is very common), Fargate is more efficient. We're also bringing Savings Plan to EKS/Fargate (https://github.com/aws/containers-roadmap/issues/616) which is another great way to lower costs.
@tabern to start with random would be sufficient. However I would be most interested in the option to launch the cheapest instance type. I mostly use a couple of different instance types that roughly have the same cpu/memory. For example: m5.xlarge, m5a.xlarge, m5d.xlarge. This makes it sure that all jobs land on instances with roughly the same power available to them. Also this used to be very important for the kubernetes cluster autoscaler because it uses one of the nodes as a template to see if a new pod would fit that node. I am not sure if this is still the case though (but I guess it is).
We would be interested in specifying a 'Capacity-Optimised' allocation strategy, as we have seen instability in Spot using 'Lowest-price' as we have suffered from losing instances within a given AZ then getting then back again, and losing them again where that instance type in that AZ is near exhaustion. We have therefore moved to diversified pools of instances matching the same capacity requirements, with a Capacity-Optimised strategy, i.e. we are willing to take a hit on getting the cheapest spot for stability.
When can we expect this?
Is there an ETA to release this feature? We're interested in migrating from Kops to EKS Managed, but not having Spot Instances is going to increase all of our pre-environments costs, which is a no-go.
This would be a really outstanding important feature, hope it comes soon :)
+1 to this, essential feature IMO.
o release this feature? We're interested in migrating from Kops to EKS Managed, but not having Spot Instances is going to increase all of our pre-environments costs, which is a no-go.
I'd suggest checking out this workshop and https://ec2spotworkshops.com/using_ec2_spot_instances_with_eks.html and this blog post https://itnext.io/the-definitive-guide-to-running-ec2-spot-instances-as-kubernetes-worker-nodes-68ef2095e767.
Agreed that this is an essential EKS offering especially to support development pipelines. Make it so!
Any update on this item?
Any update please?
Hi, are there some new about this topic?
This would be pretty useful given widespread industry mandates to cut costs right now .....
any updates? It would help us keep out cost low on EKS cluster which we plan to use for our CI builds.
@tabern after moving to eks on reserved instances we are now thinking of leveraging spot instances.
We do use cluster autoscaler on production today.
If we have 2 node groups and if i were to set precedence for "spot" worker node groups (over reserved) to expand first and only if that is not successful i would like to go to reserved instances.
To make this happen in understand i would have to implement something like this https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md
This, in my opinion, can also work with SpotAllocationStrategy set to capacity-optimized
So i think implementing priority based expander is important.
@casey-robertson 👍. Any update regarding the support of spot instances on managed node group ?