Add Worker Node to Kubespray Cluster

huangapple go评论47阅读模式
英文:

Add Worker Node to Kubespray Cluster

问题

我已经使用Kubespray部署了一个具有1个控制平面和2个工作节点的Kubernetes集群。现在,我正在尝试添加另一个工作节点。我已将要添加为工作节点的虚拟机的IP包含在inventory/mycluster/hosts.ini文件中,并运行了ansible-playbook -i inventory/mycluster/hosts.ini scale.yml --flush-cache

我收到以下错误消息:

failed: [kubespray-master-0] (item=ca.pem) => {"changed": false, "item": "ca.pem", "msg": "Permission denied"}
failed: [kubespray-master-0] (item=node-kubespray-master-0-key.pem) => {"changed": false, "item": "node-kubespray-master-0-key.pem", "msg": "Permission denied"}

kubespray-master-0 是我的Kubernetes集群主控节点。

提前感谢。

英文:

I have deployed a Kubernetes cluster with 1 control plane and 2 worker nodes using Kubespray. Now, I am trying to add another worker node. I have included the IP of the virtual machine to be added as worker node in inventory/mycluster/hosts.ini file and I ran ansible-playbook -i inventory/mycluster/hosts.ini scale.yml --flush-cache

I am getting following error:

failed: [kubespray-master-0] (item=ca.pem) => {"changed": false, "item": "ca.pem", "msg": "Permission denied"}
failed: [kubespray-master-0] (item=node-kubespray-master-0-key.pem) => {"changed": false, "item": "node-kubespray-master-0-key.pem", "msg": "Permission denied"}

kubespray-master-0 is my k8s cluster master node.

Thanks in advance.

答案1

得分: 2

根据错误消息的建议,您被拒绝访问Kubespray需要扩展集群所需的证书,具体来说,它需要证书颁发机构(CA)为新节点生成证书。

确保您具有正确的文件权限以读取CA和控制平面节点(ca.pemnode-kubespray-master-0-key.pem)的证书,并且您已正确配置了存储集群证书的路径的SSLDIR变量。

英文:

As the error message suggests you are being denied permission to access the certificates Kubespray needs to scale the cluster, specifically it needs the Certificate Authority (CA) to generate a certificate for the new node.

Ensure that you have the correct file permissions to read the certificates for the CA and for the control plane node (ca.pem and node-kubespray-master-0-key.pem) and that you have correctly configured your SSLDIR variable to the path storing your cluster's certificates.

huangapple
  • 本文由 发表于 2020年1月6日 16:48:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609060.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定