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 年前641 查看次数
1 回答
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
专家
已回答 1 年前
  • 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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则