Does deleting EKS nodes also delete corresponding EC2 instances?

0

If i delete the kubernetes nodes using kubectl delete node node_name , will EKS automatically deletes the EC2 VM's too?

1 Answer
0

Hi,

No, removes the node from EKS, but doesn't terminate the EC2 instance. If you want to completely remove your worker nodes, you should use "eksctl" (or the AWS console):

eksctl delete nodegroup --cluster=clusterName --name=nodegroupName

According to AWS documentation, this command sets the minimum, maximum, and desired size of your Auto Scaling group to zero, and sends a signal to drain the Pods before terminating the instance.

profile picture
EXPERT
answered a year ago
  • And if you want to delete just one node, but not the whole node group:

    1. You the kubectl drain command on that node to remove the pods from it. Validate.
    2. Terminate the instance through AWS. You could do this through the CLI, Console, or AutoScaling Group.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions