请问如何加入一个不在同一个内网的主机(rancher2.0.7)

我用rancher v2.0.7添加了一个k8s集群,网络选的cni,我这有几台主机与rancher在一个内网,添加进集群都成功了。

还有一个主机与它们不在一个内网,添加的时候指定外网ip(外网ip是一个虚拟ip指向这个服务器,用ifconfig查这个服务器是没有这个外网ip的),结果显示node ip是空,显示"Unable to update cni config: No networks found in /etc/cni/net.d", 错误片段如下:


I0824 15:48:30.837087   29540 kubelet.go:299] Watching apiserver

E0824 15:48:30.840377   29540 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:464: Failed to list *v1.Node: Get https://127.0.0.1:6443/api/v1/nodes?fieldSelector=metadata.name%3Dxiaoyang003&limit=500&resourceVersion=0: dial tcp 127.0.0.1:6443: connect: connection refused

E0824 15:48:30.840423   29540 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:455: Failed to list *v1.Service: Get https://127.0.0.1:6443/api/v1/services?limit=500&resourceVersion=0: dial tcp 127.0.0.1:6443: connect: connection refused

E0824 15:48:30.840565   29540 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://127.0.0.1:6443/api/v1/pods?fieldSelector=spec.nodeName%3Dxiaoyang003&limit=500&resourceVersion=0: dial tcp 127.0.0.1:6443: connect: connection refused

I0824 15:48:30.841556   29540 client.go:75] Connecting to docker on unix:///var/run/docker.sock

I0824 15:48:30.841579   29540 client.go:104] Start docker client with request timeout=2m0s

W0824 15:48:30.842628   29540 docker_service.go:545] Hairpin mode set to "promiscuous-bridge" but kubenet is not enabled, falling back to "hairpin-veth"

I0824 15:48:30.842647   29540 docker_service.go:238] Hairpin mode set to "hairpin-veth"

W0824 15:48:30.842717   29540 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d

W0824 15:48:30.846136   29540 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d

I0824 15:48:30.846155   29540 plugins.go:159] Loaded network plugin "cni"

I0824 15:48:30.846174   29540 docker_service.go:253] Docker cri networking managed by cni


请问各位大神,有没有什么解决办法?谢谢!

已邀请:

只要保证网络能通就可以,网络不通那没有办法

要回复问题请先登录注册