问题描述
我有一个在2台机器上运行的kubernetes集群(主-minion节点和minion节点).我想在不中断当前设置的情况下添加新的奴才节点,有办法吗?
I have a kubernetes cluster running on 2 machines (master-minion node and minion node). I want to add a new minion node without disrupting the current set up, is there a way to do it?
我已经看到,当我尝试添加新节点时,其他节点上的服务将其停止,因此,在将新节点部署到现有群集之前,我必须先停止服务.
I have seen that when I try to add the new node, the services on the other nodes stops it, due to which I have to stop the services before deploying the new node to the existing cluster.
推荐答案
要在最新版本中进行此操作(在1.10.0上进行测试),可以在主节点上发出以下命令:
To do this in the latest version (tested on 1.10.0) you can issue following command on the masternode:
kubeadm token create --print-join-command
然后它将打印出一个新的加入命令(就像您在kubeadmn init
之后得到的一样):
It will then print out a new join command (like the one you got after kubeadmn init
):
kubeadm join 192.168.1.101:6443 --token tokentoken.lalalalaqyd3kavez --discovery-token-ca-cert-hash sha256:complexshaoverhere
这篇关于将节点添加到Kubernetes中的现有集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!