I have a Kubernetes cluster running on 3 servers, a master and 2 minions. I would like to add another minion. Is it possible to add a minion without having to do the complete installation again? So far when searching for guides to do this, I can only find excellent guides on getting the whole cluster up.
相关问题
- Microk8s, MetalLB, ingress-nginx - How to route ex
- How do I change the storage class of existing pers
- Docker task in Azure devops won't accept "$(pw
- Use awslogs with kubernetes 'natively'
- Unable to run mariadb when mount volume
For me the difference between a master and a minion are the processes that get started and the orchestration (the master signals the minions that it is done and they can now come up, the minions wait for the signal). To bring up a minion after things are up would not be any different, except the signaling is already done, so the minion will just come up. This looked like a reasonable experiment to me, so I thought I'd try it! I am running in the digital ocean vps, using coreos (stable) and cloud-config to bring up fleet + flanneld + k8s. On the master I have:
The important process here is kube-register. I look at its output with :
to see when minions register. To see all the minions that I currently have :
On the minion for processes I have:
I think the kube-kubelet is the thing that registers with the master, but I could be wrong. I do know that the master constantly queries the kubelet for healthz, so it knows if a minion is ready for work. Anyway, I have a script that creates my cloud config for the master and for the minions. I just modified that script to 'skip' the master cloud config and just do the minion config. I run it and here is my minions now:
So, long story even longer, yes, it is possible to add a minion to an existing node cluster. I don't know how you are doing discovery, but, whatever method you used to 'introduce' your minion to the master in the first place will work.
I was stuck on this for awhile too. I found the solution was surprisingly simple.
If you already have a master up, start the following processes on an unconnected minion in the order they appear. (I imagine you can start a similiar network overlay first if you're using a different one).
If in doubt, just look at one of your connected minon's processes to see what flags that each process is running with.