问题描述
我有一个Kubernetes集群在3台服务器上运行,一个主服务器和两个服务器。我想添加另一个奴才。无需再次完成安装就可以添加一个小工具到目前为止,当搜索指南时,我只能找到优秀的指导,让整个集群。对于我来说,主人和奴才之间的区别是开始的过程和编排这是完成的,他们现在可以出来,奴才等待信号)。事情起来之后提起奴才不会有什么不同,除了信号已经完成,所以奴才会刚刚出现。这看起来像是一个合理的实验,所以我以为我会尝试!我正在运行在数字海洋vps,使用coreos(稳定)和cloud-config来提出车队+ flanneld + k8s。在主人身上:
- etcd
- 舰队
- flanneld
- docker
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- kube-register
这里的重要过程是kube注册。我看看它的输出:
journalctl -u kube-register
pre>
查看奴才注册。要查看我目前拥有的所有奴才:
core @ pa1〜/ tmp $ kubectl get minions
NAME LABELS STATUS
104.236.214.244< none>准备
104.236.31.77< none>准备
对于我的流程,我有:
- 舰队
- flanneld
- docker
- kube-proxy
- kube-kubelet
我认为kube-kubelet是与主人注册的东西,但我可能是错的。我知道主人不断地询问kubelet的健康,所以它知道一个奴才是否准备上班。无论如何,我有一个脚本,为主人和奴才创建我的云配置。我只是修改了这个脚本来跳过主云配置,只是做了配置。我运行它,这里是我的奴才:
core @ pa1 / $ kubectl get minions
NAME LABELS STATUS
104.236.214.244< none>准备
104.236.31.77< none>准备
45.55.164.39< none>准备
所以,漫长的故事更长,是的,可以添加一个奴才到现有的节点簇。我不知道你是如何做发现的,但是无论何种方法,你首先将你的奴才介绍给主人,都会奏效。
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.
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:
- etcd
- fleet
- flanneld
- docker
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- kube-register
The important process here is kube-register. I look at its output with :
journalctl -u kube-register
to see when minions register. To see all the minions that I currently have :
core@pa1 ~/tmp $ kubectl get minions
NAME LABELS STATUS
104.236.214.244 <none> Ready
104.236.31.77 <none> Ready
On the minion for processes I have:
- fleet
- flanneld
- docker
- kube-proxy
- kube-kubelet
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:
core@pa1 / $ kubectl get minions
NAME LABELS STATUS
104.236.214.244 <none> Ready
104.236.31.77 <none> Ready
45.55.164.39 <none> Ready
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.
这篇关于如何在当前群集中添加新的Kubernetes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!