我有一个CentOS vm(用于安装RKE)和三个节点,安装了rancherOS(here的vmware版本用于controlplane,etcd和worker节点)
我收到“成功完成Kubernetes集群的构建”消息,但是在编写“ kubectl get nodes”命令时出现错误。安装rke后,kubectl命令不起作用,我从official website手动安装了它。
结果:
结果是当我与牧场主用户一起运行时,打印此错误: 无法连接到服务器:net / http:TLS握手超时
带有根: 服务器错误:etcdserver:请求超时
问题出在哪里?我的rke设计正确吗?
RKE(一个虚拟机Centos)
环境信息
已安装RKE的VM:CentOS-2CPU / 4GB内存 RancherOS安装的VM:2CPU / 4GB内存
$ rke --version
rke version v1.0.1
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:30:10Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
Unable to connect to the server: net/http: TLS handshake timeout
$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* rancher_cluster rancher_cluster kube-admin-rancher_cluster
$ kubectl config current-context
rancher_cluster
$ kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://xxx.xxx.xxx.xxx:6443
name: rancher_cluster
contexts:
- context:
cluster: rancher_cluster
user: kube-admin-rancher_cluster
name: rancher_cluster
current-context: rancher_cluster
kind: Config
preferences: {}
users:
- name: kube-admin-rancher_cluster
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
在RKE服务器(CentOS)中
$ sudo docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64
Go version: go1.10.3
Git commit: 7f2769b/1.13.1
Built: Sun Sep 15 14:06:47 2019
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64
Go version: go1.10.3
Git commit: 7f2769b/1.13.1
Built: Sun Sep 15 14:06:47 2019
OS/Arch: linux/amd64
Experimental: false
在RancherOS VM中
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea838
Built: Wed Nov 13 07:22:05 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea838
Built: Wed Nov 13 07:28:45 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683