我有一个由3个主节点组成的kubernetes集群。他们被命名为主人-1,主人-2和主人-3。我想把它们改名为控制飞机。
我找不到一个明确的程序来做这件事。最近的是如何重命名集群中的节点。所以我就试过了。下面是我所做的工作(我的主机运行的是ubuntu18.04,kubernetes v1.16.2):
关于主人-1:
3 --ignore-daemonsets
。
关于大师-3:
control-plane-3
f 219
这是我得到的日志:
sudo kubeadm join 172.22.19.188:6443 --control-plane --token nxxzby.zsfdx86e7cv1rq0e --discovery-token-ca-cert-hash sha256:553366c2f91fd3abffe3e3d1c39d9314e2d73e8a6181f4da9938a8e24fd77456
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[preflight] Running pre-flight checks before initializing the new control plane instance
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/data/kubernetes/pki"
error execution phase control-plane-prepare/certs: error creating PKI assets: failed to write or validate certificate "apiserver": certificate apiserver is invalid: x509: certificate is valid for master-3, kubernetes, kubernetes.default, kubernetes.default.svc, kubernetes.default.svc.cluster.local, not control-plane-3
To see the stack trace of this error execute with --v=5 or higher我该怎么做?还是有更好的方法?
提前感谢您所能提供的任何想法或建议。
发布于 2020-08-31 11:31:12
基于@zerkms注释,您可以创建一个具有正确名称的第四个节点,连接,然后从集群中删除一个旧节点。
这样做3次,您将能够拥有所有的节点与所需的名称。
https://stackoverflow.com/questions/63588048
复制相似问题