简体   繁体   English

AWS Kubernetes - 如何将新节点添加到 Kops 集群

[英]AWS Kubernetes - How to add new nodes to Kops cluster

I used KOPS to create a Kubernetes cluster.我使用KOPS创建了一个 Kubernetes 集群。 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.您可以执行kops edit ig <instance group>并更改最小值/最大值。 Or you can only increase the max value and enable the cluster autoscaler addon to dynamically size your cluster based on needs.或者您只能增加max并启用集群自动扩缩器插件以根据需要动态调整集群大小。 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM