Reputation: 215
I want to replace a node group entirely with fresh nodes in an EKS node group.
Whats is the difference between
eksctl scale nodegroup --cluster=$CLUSTER_NAME --nodes=0
And draining/deleting nodegroup, then provisioning via Terraform?
Upvotes: 0
Views: 985
Reputation: 3784
To replace an entire node group in an EKS cluster, you can either use the eksctl command or manually drain and delete the node group and provision a new one with Terraform.
eksctl scale nodegroup --cluster=my-cluster --nodes=0
This command will drain and delete all nodes in the node group, leaving the node group empty. You can then use the eksctl create nodegroup command to provision a new node group with the desired configuration.
The difference between draining and deleting a node group is that :
Draining a node group will gracefully terminate the nodes in the group, while deleting a node group will immediately terminate the nodes.
Draining a node group is typically used when you want to replace the node group with a new one, while deleting a node group is usually used when you want to completely remove the node group from the EKS cluster
For more information refer to this EKS Doc
Upvotes: 1