pulumi / pulumi-eks

A Pulumi component for easily creating and managing an Amazon EKS Cluster
https://www.pulumi.com/registry/packages/eks/
Apache License 2.0
171 stars 79 forks source link

ManagedNodeGroup misses capacityRebalance and replacementStrategy #672

Closed geNAZt closed 15 hours ago

geNAZt commented 2 years ago

Hello!

Issue details

Currently i try to use a spot managed node group which auto balances itself to the lowest price. This should be possible with https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html / https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html . So setting capacityRebalance to lowest-price and replacementStrategy to launch-before-terminate.

Currently both are not settable via ManagedNodeGroup but can be set in AutoscalingGroups.

Affected area/feature

ManagedNodeGroup

better0332 commented 2 years ago

I need this.

flostadler commented 3 months ago

EKS managed node groups should have capacity rebalance turned on by default.

AWS does not expose replacementStrategy for managed node groups as far as I can tell: https://awscli.amazonaws.com/v2/documentation/api/2.0.34/reference/eks/create-nodegroup.html

flostadler commented 15 hours ago

EKS managed node groups manage the underlying Auto Scaling Group. AWS EKS configures the ASG with the allocation strategy price-capacity-optimized and capacity rebalancing enabled. When receiving rebalancing recommendations or spot interruption notifications, it will boot a replacement node, cordon&drain the node that's being replaced, before finally shutting it down.

If you're missing certain configuration options, I'd recommend cutting an issue in the AWS container roadmap.