首页 > 其他 > 详细

kubeadm添加新master或node

时间:2021-05-29 17:36:01      阅读:13      评论:0      收藏:0      [点我收藏+]
kubeadm添加新master或node
一、首先在master上生成新的token
[root@k8s-master01 pack]# kubeadm token create --print-join-command
kubeadm join vip:8443 --token ltpvr8.5063mz2d5smi61hv     --discovery-token-ca-cert-hash sha256:98538bed13fa10bcc98a849dd22467f43eedd09aee87aaaa1a4f39c1bd98d1cf
二、在master上生成用于新master加入的证书
[root@k8s-master01 pack]# kubeadm init phase upload-certs --experimental-upload-certs
I0529 14:59:54.518136   25689 version.go:96] could not fetch a Kubernetes version from the internet: unable to get URL "https://dl.k8s.io/release/stable-1.txt": Get https://dl.k8s.io/release/stable-1.txt: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I0529 14:59:54.518331   25689 version.go:97] falling back to the local client version: v1.14.10
[upload-certs] Storing the certificates in ConfigMap "kubeadm-certs" in the "kube-system" Namespace
[upload-certs] Using certificate key:
383c3d7433eb2ab684c2a5ee82e2dab5080ce395fbe61a176dfae6e32939a3dd
383c3d7433eb2ab684c2a5ee82e2dab5080ce395fbe61a176dfae6e32939a3dd
三、添加新node
kubeadm join vip:8443 --token ltpvr8.5063mz2d5smi61hv     --discovery-token-ca-cert-hash sha256:98538bed13fa10bcc98a849dd22467f43eedd09aee87aaaa1a4f39c1bd98d1cf
四、添加新master,把底色部分加到--experimental-control-plane --certificate-key后
kubeadm join vip:8443 --token ltpvr8.5063mz2d5smi61hv      --discovery-token-ca-cert-hash sha256:98538bed13fa10bcc98a849dd22467f43eedd09aee87aaaa1a4f39c1bd98d1cf 	--experimental-control-plane --certificate-key 383c3d7433eb2ab684c2a5ee82e2dab5080ce395fbe61a176dfae6e32939a3dd

kubeadm添加新master或node

原文:https://www.cnblogs.com/xjzyy/p/14825338.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!