How change the node count of a created cluster

3/30/2018

I created a cluster with kops in the AWS.

sudo kops create cluster --name=k8s.ehh.fun --state=s3://kops-state-ehh000 --zones=us-east-1a --node-count=3 --node-size=t2.micro --master-size=t2.micro --dns-zone=k8s.ehh.fun

And now a Would like to change the node-count without destroy the cluster. How can I do that? I tried :

 sudo kops update cluster --name=k8s.ehh.fun --state=s3://kops-state-ehh000 --node-count=3 --node-size=t2.micro 

But I got : Error: unknown flag: --node-count

-- ehh
kops
kubernetes

1 Answer

3/30/2018

You can change the node count by editing the nodes instance group:

kops edit instancegroup nodes

This will open an editor in which you can edit your instance group's specification and increase the code count. After saving and exiting, call:

kops update cluster <cluster-name> --yes

This will automatically update your auto-scaling group and start additional instances (or terminate them if you decreased the node count).

See the documentation for more information.

-- helmbert
Source: StackOverflow