Edcel Cabrera Vista
Edcel Cabrera Vista

Reputation: 1114

AWS EKS - NodeGroup Update Instance Types

I'm currently have a Kubernetes Application using AWS EKS. I also created nodegroup; initial I provisioned low instance capacity on that nodeGroup can only handle 4 pods. When I tried to rollout an update on my deployments error occurred insufficient pods, this is mainly due to the under capacity instance type that I initially provision. My question is it possible to update the live nodeGroup instancetype?

I solved the problem though by creating additional nodegroup with scaled up instance type. I'm just wondering if it's possible to edit the live nodegroup instance type for scaling up.

Upvotes: 11

Views: 31858

Answers (4)

jayaprakash R
jayaprakash R

Reputation: 192

surely we can update the node type. this is possible only when you created the node group via the launch template and EKS optimized instance. so when you create a new template version with a new instance type you can update the node group instance type without deleting the node group

Upvotes: 1

Kornel Chlebovics
Kornel Chlebovics

Reputation: 161

The instance type can be changed by applying a new launch template version. However as any node related changes are immutable in nature, beware that this will in reality create new EC2 instances and get rid of the old ones (depending on the use case), and won't change instance types on the existing nodes. The EKS nodegroups are in essence EC2 auto scaling groups, which use launch templates to scale the nodes up and down. Furthermore the launch template defines the instance type. Hence by defining a new launch template, any new nodes that would be spun up would use the new instance type (plus, in case the number of nodes doesn't change, then the change can be executed via a rolling update to minimize the impact to the cluster). Steps to update in AWS console:

  1. Navigate to auto scaling groups under the EC2 service
  2. Find the launch template corresponding to the auto scaling group for the nodegroup
  3. Create a new version by selecting Actions - Modify template (create new version) This will take the existing template, so only the instance type needs to be modified.
  4. Set default version for the launch template by clicking on Actions - Set default version
  5. Applying the change
    • Number of nodes remain the same:
      • Open the auto scaling group

      • Click on Start instance refresh

      • Set appropriate minimum healthy percentage and instance warmup

        An instance refresh replaces instances. Each instance is terminated first and then replaced, which temporarily reduces the capacity available within your Auto Scaling group. Learn more

        In case there is only a single node, then it could make sense to temporarily scale up to 2 nodes for the refresh process to be able to reschedule the workload evicted from the node being refreshed.

    • Number of nodes reduces:
      • The nodegroup can be scaled down via eksctl scale nodegroup. But bear in mind, that this will terminate all instances in the nodegroup and create the new instances based on the updated launch template.
    • Number of nodes increases:
      • The nodegroup can be scaled up via eksctl scale nodegroup. The new instances that will be created will based on the updated launch template.

Reference with screenshots

Upvotes: 16

R. Pandey
R. Pandey

Reputation: 19

You can not update instance type , use autoscaling or create a new node group & make pods schedule over there

Upvotes: 2

Yaron Idan
Yaron Idan

Reputation: 6765

EKS nodegroups instance types cannot be changed after creation. You'll have to create a new node group every time you'd like a new instance type.

Upvotes: 17

Related Questions