将节点添加到 Kubernetes 中的现有集群 [英] Adding node to existing cluster in Kubernetes

查看:36
本文介绍了将节点添加到 Kubernetes 中的现有集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 2 台机器上运行的 kubernetes 集群(master-minion 节点和 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

然后它会打印出一个新的 join 命令(就像你在 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 中的现有集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆