Master无法连接到群集

问题描述 投票:4回答:1

升级集群后,三个主服务器之一无法连接回集群。我有一个在us-east-1a,us-east-1b和us-east-1c中运行的HA群集,在us-east-1a中运行的我的主服务器无法返回该群集。

我试图将master-us-east-1a实例组缩减为零个节点,然后将其还原为一个节点,但是EC2机器启动时遇到了同样的问题,无法再次返回到群集,似乎始于一个备份或其他内容。

我试图连接主服务器以重启服务,也许是protukube或docker,但我也无法解决问题。

通过主服务器中的ssh连接,我注意到该计算机上未运行法兰绒服务。我尝试通过docker手动运行,但未成功。似乎法兰绒是应该运行的网络服务,不是。

  • 我可以重设us-east-1a的母版并从零创建它吗?
  • 或者我可以将主人从us-east-1a移到us-east-1d吗?
  • 有关在此主服务器上运行法兰绒服务的任何想法?

提前感谢。

附件

> sudo systemctl status kubelet

Jan 10 21:00:55 ip-xxx-xxx-xxx-xxx kubelet[2502]: I0110 21:00:55.026553    2502 kubelet_node_status.go:441] Recording NodeHasSufficientPID event message for node ip-xxx-xxx-xxx-xxx.ec2.internal
Jan 10 21:00:55 ip-xxx-xxx-xxx-xxx kubelet[2502]: I0110 21:00:55.027005    2502 kubelet_node_status.go:79] Attempting to register node ip-xxx-xxx-xxx-xxx.ec2.internal
Jan 10 21:00:55 ip-xxx-xxx-xxx-xxx kubelet[2502]: E0110 21:00:55.027764    2502 kubelet_node_status.go:103] Unable to register node "ip-xxx-xxx-xxx-xxx.ec2.internal" with API server: Post https://127.0.0.1/api/v1/nodes: dial tcp 127.0.0.1:443: connect: connection refused

-

> sudo docker logs k8s_kube-apiserver_kube-apiserver-ip-xxx-xxx-xxx-xxx.ec2.internal_kube-system_134d55c1b1c3bf3583911989a14353da_16

F0110 20:59:35.581865       1 storage_decorator.go:57] Unable to create storage backend: config (&{etcd3 /registry [http://127.0.0.1:4001]    true false 1000 0xc42013c480 <nil> 5m0s 1m0s}), err (dial tcp 127.0.0.1:4001: connect: connection refused)

-

> sudo docker version

Client:
 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:31:19 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.2-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:31:19 2017
 OS/Arch:      linux/amd64
 Experimental: false

-

> kubectl version

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.9", GitCommit:"16236ce91790d4c75b79f6ce96841db1c843e7d2", GitTreeState:"clean", BuildDate:"2019-03-25T06:40:24Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server 127.0.0.1 was refused - did you specify the right host or port?

-

> sudo docker images

REPOSITORY                           TAG                 IMAGE ID            CREATED             SIZE
protokube                            1.15.0              6b00e7216827        7 weeks ago         288 MB
k8s.gcr.io/kube-proxy                v1.11.9             e18fcce798b8        9 months ago        98.1 MB
k8s.gcr.io/kube-controller-manager   v1.11.9             634ccbd18a0f        9 months ago        155 MB
k8s.gcr.io/kube-apiserver            v1.11.9             ef9a84756d40        9 months ago        187 MB
k8s.gcr.io/kube-scheduler            v1.11.9             e00d30bd3a71        9 months ago        56.9 MB
k8s.gcr.io/pause-amd64               3.0                 99e59f495ffa        3 years ago         747 kB
kopeio/etcd-manager                  3.0.20190930        7937b67f722f        50 years ago        656 MB
amazon-web-services kubernetes etcd kops flannel
1个回答
0
投票

Kubelet尝试向API服务器端点https://127.0.0.1:443注册主节点us-east-1a。我认为这应该是其他两个主服务器中任何一个的API服务器端点。 Kubelet使用kubelet.conf文件与API服务器进行对话以注册节点。将位于server的kubelet.conf文件中的/etc/kubernetes更改为指向以下之一:

  1. [us-east-1b或us-east-1c ex https://xx.xx.xx.xx:6443上主节点的弹性IP或公共IP
  2. 当前主节点us-east-1b或us-east-1c ex https://xx.xx.xx.xx:6443的私有IP >>
  3. 如果正在运行kubernetes API服务器的主节点前面有负载均衡器,则为当前主节点的FQDN。
  4. 更改kubelet.conf后,重新启动kubelet。

© www.soinside.com 2019 - 2024. All rights reserved.