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}
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}
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.
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