请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册
搜索

kubeadm添加新master

[复制链接]
160 abc 发表于 2020-11-19 21:50:10
  1. 首先在master上生成新的token

  2. 1
  3. kubeadm token create --print-join-command
  4. [root@cn-hongkong nfs]# kubeadm token create --print-join-command
  5. kubeadm join 172.31.182.156:8443 --token ortvag.ra0654faci8y8903     --discovery-token-ca-cert-hash sha256:04755ff1aa88e7db283c85589bee31fabb7d32186612778e53a536a297fc9010

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

  7. 1
  8. kubeadm init phase upload-certs --experimental-upload-certs
  9. [root@cn-hongkong k8s_yaml]# kubeadm init phase upload-certs --experimental-upload-certs
  10. [upload-certs] Storing the certificates in ConfigMap "kubeadm-certs" in the "kube-system" Namespace
  11. [upload-certs] Using certificate key:
  12. f8d1c027c01baef6985ddf24266641b7c64f9fd922b15a32fce40b6b4b21e47d
  13. 三、添加新node

  14. 1
  15. kubeadm join 172.31.182.156:8443 --token ortvag.ra0654faci8y8903     --discovery-token-ca-cert-hash sha256:04755ff1aa88e7db283c85589bee31fabb7d32186612778e53a536a297fc9010
  16. 四、添加新master,把红色部分加到--experimental-control-plane --certificate-key后。

  17. 1
  18. 2
  19. 3
  20. kubeadm join 172.31.182.156:8443  --token ortvag.ra0654faci8y8903 \
  21.   --discovery-token-ca-cert-hash sha256:04755ff1aa88e7db283c85589bee31fabb7d32186612778e53a536a297fc9010 \
  22.   --experimental-control-plane --certificate-key f8d1c027c01baef6985ddf24266641b7c64f9fd922b15a32fce40b6b4b21e47d
复制代码
https://www.cnblogs.com/Dev0ps/p/10980516.html

http://www.linuxcache.com/archives/5683
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表