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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南