#yyds干货盘点# kubeadm添加新master或node

网友投稿 280 2022-10-23

#yyds干货盘点# kubeadm添加新master或node

一、首先在master上生成新的token

kubeadm token create --print-join-commandkubeadm token create --print-join-comman范例[root@cn-hongkong nfs]# kubeadm token create --print-join-commandkubeadm join 172.31.182.156:8443 --token ortvag.ra0654faci8y8903 --discovery-token-ca-cert-hash sha256:04755ff1aa88e7db283c85589bee31fabb7d32186612778e53a536a297fc9010

​二、在master上生成用于新master加入的证书

kubeadm init phase upload-certs --experimental-upload-certs范例[root@cn-hongkong k8s_yaml]# kubeadm init phase upload-certs --experimental-upload-certs[upload-certs] Storing the certificates in ConfigMap "kubeadm-certs" in the "kube-system" Namespace[upload-certs] Using certificate key:f8d1c027c01baef6985ddf24266641b7c64f9fd922b15a32fce40b6b4b21e47d

​三、添加新node

kubeadm join 172.31.182.156:8443 --token ortvag.ra0654faci8y8903 --discovery-token-ca-cert-hash sha256:04755ff1aa88e7db283c85589bee31fabb7d32186612778e53a536a297fc9010

​ 四、添加新master,把红色部分加到--experimental-control-plane --certificate-key后。

kubeadm join 172.31.182.156:8443 --token ortvag.ra0654faci8y8903 \ --discovery-token-ca-cert-hash sha256:04755ff1aa88e7db283c85589bee31fabb7d32186612778e53a536a297fc9010 \ --experimental-control-plane --certificate-key f8d1c027c01baef6985ddf24266641b7c64f9fd922b15a32fce40b6b4b21e47d

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Java基础教程之整数运算
下一篇:手把手教你在机器学习过程设计Python接口
相关文章

 发表评论

暂时没有评论,来抢沙发吧~