操作系统信息
例如:虚拟机/物理机,Centos7.5/Ubuntu18.04,4C/8G

Kubernetes版本信息
v1.23.10

容器运行时
docker version 24.0.6

KubeSphere版本信息
v3.4.1。使用kk离线安装。

问题是什么?
使用命令:./kk add nodes -f ksp-v3013-v12310-offline.yaml
目的是添加一个worker9节点。
但是运行过程中出现错误:

15:40:34 CST [KubernetesStatusModule] Get kubernetes cluster status

15:40:34 CST stdout: [master1]

v1.23.10

15:40:34 CST stdout: [master1]

The connection to the server lb.kubesphere.local:6443 was refused - did you specify the right host or port?

15:40:34 CST message: [master1]

get kubernetes cluster info failed: Failed to exec command: sudo -E /bin/bash -c “/usr/local/bin/kubectl –no-headers=true get nodes -o custom-columns=:metadata.name,:status.nodeInfo.kubeletVersion,:status.addresses”

The connection to the server lb.kubesphere.local:6443 was refused - did you specify the right host or port?: Process exited with status 1

15:40:34 CST retry: [master1]

如下图:

检查了dns也没问题啊,手动执行“/usr/local/bin/kubectl –no-headers=true get nodes -o custom-columns=:metadata.name,:status.nodeInfo.kubeletVersion,:status.addresses”也能出结果。求解决

    yqwang 之前用同样kk add nodes命令的方式,很快就能成功添加节点,今天真不知道什么情况了。有大神遇到过吗

    6 天 后

    估计是haproxy的配置没过来,你手动从成功加入的节点上拷一份过来,没有目录的就建目录既可。

      12 天 后