1

I want to delete the single node of cluster

here is my problem i am create the node where 2 nodes are running only but for sometime i need more nodes for few minutes only then after using scaling down i want delete the drain node only from cluster. i do scaling up/down manually
here is the step i follow

  1. create cluster with 2 node
  2. scale up the cluster and add 2 more.
  3. after i want to delete the 2 node with all backup pod only

i tried it with command

eksctl scale nodegroup --cluster= cluster-name --name= name --nodes=4 --nodes-min=1  --nodes-max=4

but it doesn't help it will delete random node also manager will crash.

David Maze
  • 130,717
  • 29
  • 175
  • 215
Mystery Girl
  • 65
  • 1
  • 5
  • You can use Cluster Autoscaler which can prevent removing nodes randomly. You can read [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-types-of-pods-can-prevent-ca-from-removing-a-node) what CA is and how can it help you achieve for your problem. Let me know if it is helpful for you – RadekW Feb 03 '22 at 14:43

1 Answers1

1

One option is using a separate node group for the transient load, use taints/tolerations for laod to be scheduled on that node group, drain/delete that particular node group if not needed.

Do you manually scale up/down nodes? If you are using something like cluster auto scaler, there will be variables like "cluster-autoscaler.kubernetes.io/safe-to-evict": "false" to protect pods from scaling down.

ffran09
  • 887
  • 7
  • 9