0

I used KOPS to create a Kubernetes cluster. I want to add additional nodes without disrupting existing cluster. Any idea how I can do this?

kops create cluster --node-count=3 --node-size=t2.large --zones=us-west-2 --name=${KOPS_CLUSTER_NAME}
user630702
  • 2,529
  • 5
  • 35
  • 98
  • Does this answer your question? [how to add a node to my kops cluster? (node in here is my external instance)](https://stackoverflow.com/questions/50248179/how-to-add-a-node-to-my-kops-cluster-node-in-here-is-my-external-instance) – Hackerman Jul 18 '22 at 21:38

2 Answers2

0

It depends a little on where you want to add them. You can do a kops edit ig <instance group> and change the min/max. Or you can only increase the max value and enable the cluster autoscaler addon to dynamically size your cluster based on needs. You may also want to add more subnets and make your cluster more highly available using additional availability zones.

Ole Markus With
  • 1,017
  • 1
  • 8
  • 10
0

The following does the job for me

## updating instance size
kops get instancegroups
## edit the size of instance group and save the file
kops edit ig <instance-group-name>
kops get instancegroups
kops update cluster --name=${KOPS_CLUSTER_NAME}
kops update cluster --name=${KOPS_CLUSTER_NAME} --yes
kops rolling-update cluster --name=${KOPS_CLUSTER_NAME}
kops rolling-update cluster --name=${KOPS_CLUSTER_NAME} --yes
kops get instancegroups

## updating the number of instances
kops edit ig <instance-group-name>
## edit the minSize and maxSize
kops get instancegroups      
kops update cluster --name=${KOPS_CLUSTER_NAME}
kops update cluster --name=${KOPS_CLUSTER_NAME} --yes
codeaprendiz
  • 2,703
  • 1
  • 25
  • 49