简体   繁体   中英

How to add a kubernetes node to the existing cluster on aws

I followed the tutorial how to create a k8s cluster on aws using ubuntu. This works great, so I have one master and three nodes - minions. However I haven't found any working working recipe how to add a new node to the cluster.

  1. First of all, I have a new autoscaling group in aws. It was created along with the cluster. I tried to increase the number of nodes in the scaling group, the scaling procedure really added an instance but the node is not among the k8s cluster . There is no kubelet, kube-proxy, no such thing on the instance. So, it's reasonable that it did not join the k8s cluster.

As I have not found any tutorial, maybe I need to do some manual procedure. But it would be weird autoscaling. What am I supposed to do? kube scripts install the cluster, add scaling group and it does not work?

  1. I do not insist on the automatic scaling, I just need to add a new node in the case of any failure or how we will add new running pods/rcs. I found a reference in this article in the section called Add more nodes in a second zone , note that this is about multizone deployment.

So I tried things like:

KUBE_USE_EXISTING_MASTER=true KUBERNETES_PROVIDER=aws KUBE_AWS_ZONE=eu-central-1b NUM_NODES=1 KUBE_SUBNET_CIDR=172.20.1.0/24 MASTER_INTERNAL_IP=172.20.0.9 kubernetes/cluster/kube-up.sh

but it always failed with:

A client error (AlreadyExists) occurred when calling the CreateLaunchConfiguration operation: Launch Configuration by this name already exists - A launch configuration already exists with the name kubernetes-minion-group-eu-central-1b

There must be definitely some way how to do that, can you please someone help me? Thank you!

After some attempts it seemed that the auto-scaling group worked using debian images. Note that it needs aprox. 2 minutes once the instance is ready with all installed necessities and you can see the instance using get nodes .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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