英文:
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.pem
和node-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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论