我正在尝试通过VMS设置K8S,并成功安装了主节点。
kubectl get nodes -o wide
master Ready control-plane,master 14m v1.20.1 192.168.5.13 <none> Ubuntu 18.04.5 LTS 4.15.0-124-generic docker://18.6.3
工作节点也准备好安装ocker、kubeadm、kubectl和kubelet。防火墙已禁用,主节点和工作节点上的交换也已关闭。
当我尝试以root身份在worker上运行以下命令时:
kubeadm join 192.168.5.13:6443 --token pk2b8n.i89ywir9vs7cqm7n --discovery-token-ca-cert-hash sha256:e9214f892d58196fa6608968f82965113e5dc1928c00d7cf066b52ae4d7037f0 --control-plane
获取以下错误
[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 -o yaml'
error execution phase preflight:
One or more conditions for hosting a new control plane instance is not satisfied.
failure loading certificate for CA: couldn't load the certificate file /etc/kubernetes/pki/ca.crt: open /etc/kubernetes/pki/ca.crt: no such file or directory
Please ensure that:
* The cluster has a stable controlPlaneEndpoint address.
* The certificates that must be shared among control plane instances are provided.
To see the stack trace of this error execute with --v=5 or higher
我应付不来。有什么帮助吗?我会很感激的。
1条答案
按热度按时间gmxoilav1#
花了很多时间才发现,我希望这能对某人有所帮助!
现在转到工作节点,以root身份再次运行此命令
在主机上,您可以验证