kubeadm添加新master或node、unknown flag --experimental-upload-certs
2021/8/25 11:06:43
本文主要是介绍kubeadm添加新master或node、unknown flag --experimental-upload-certs,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
在master01上
生成新token
[root@k8s-master01 ~]# kubeadm token create --print-join-command W0825 09:25:49.300571 23457 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io] kubeadm join 192.168.80.10:16443 --token il1ddh.6s1rp74bb3cf18wv --discovery-token-ca-cert-hash sha256:b7c2ecb0c238eadf5c6b8657137203c11633fd4c812bcea10e1dfbc61a36861f
生成新证书
1.16版本前参数为--experimental-upload-certs
,1.16及1.16版本以后为--upload-certs
命令不对就会出现unknown flag --experimental-upload-certs的错误
[root@k8s-master01 ~]# kubeadm init phase upload-certs --upload-certs I0825 09:35:16.039382 32084 version.go:255] remote version is much newer: v1.22.1; falling back to: stable-1.19 W0825 09:35:16.739034 32084 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io] [upload-certs] Storing the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace [upload-certs] Using certificate key: a615c6fb67eff694085de21480c462de2bc65b545884957ae0d37b109000e281
在新节点
添加新node节点
kubeadm join 192.168.80.10:16443 --token il1ddh.6s1rp74bb3cf18wv --discovery-token-ca-cert-hash sha256:b7c2ecb0c238eadf5c6b8657137203c11633fd4c812bcea10e1dfbc61a36861f
添加新master节点
同样,1.16版本前参数为--experimental-control-plane --certificate-key
,1.16及1.16版本以后为--control-plane --certificate-key
kubeadm join 192.168.80.10:16443 --token il1ddh.6s1rp74bb3cf18wv --discovery-token-ca-cert-hash sha256:b7c2ecb0c238eadf5c6b8657137203c11633fd4c812bcea10e1dfbc61a36861f --control-plane --certificate-key a615c6fb67eff694085de21480c462de2bc65b545884957ae0d37b109000e281
etcdctl --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/server.crt" --key="/etc/kubernetes/pki/etcd/server.key" member list
这篇关于kubeadm添加新master或node、unknown flag --experimental-upload-certs的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23增量更新怎么做?-icode9专业技术文章分享
- 2024-11-23压缩包加密方案有哪些?-icode9专业技术文章分享
- 2024-11-23用shell怎么写一个开机时自动同步远程仓库的代码?-icode9专业技术文章分享
- 2024-11-23webman可以同步自己的仓库吗?-icode9专业技术文章分享
- 2024-11-23在 Webman 中怎么判断是否有某命令进程正在运行?-icode9专业技术文章分享
- 2024-11-23如何重置new Swiper?-icode9专业技术文章分享
- 2024-11-23oss直传有什么好处?-icode9专业技术文章分享
- 2024-11-23如何将oss直传封装成一个组件在其他页面调用时都可以使用?-icode9专业技术文章分享
- 2024-11-23怎么使用laravel 11在代码里获取路由列表?-icode9专业技术文章分享
- 2024-11-22怎么实现ansible playbook 备份代码中命名包含时间戳功能?-icode9专业技术文章分享