从Rancher服务器重新安装后无法访问Kubernetes仪表板

时间:2017-11-27 11:12:50

标签: kubernetes dashboard rancher

第一次从Rancher服务器安装Kubernetes环境成功。

删除它并再次安装,所有堆栈都变为绿色,但是当访问Kubernetes仪表板时,只有一个空白页面。

检查仪表板的容器日志:

$ docker ps -a | grep dash
0b8129ff9809        gcr.io/google_containers/kubernetes-dashboard-amd64    "/dashboard --inse..."   36 seconds ago       Exited (1) 30 seconds ago                         k8s_kubernetes-dashboard_kubernetes-dashboard-5ffb9c9bb7-v5mhw_kube-system_2fe1595e-d35b-11e7-bf25-0264f6c60326_4
ab246945e1c6        gcr.io/google_containers/pause-amd64:3.0               "/pause"                 2 minutes ago        Up 2 minutes                                      k8s_POD_kubernetes-dashboard-5ffb9c9bb7-v5mhw_kube-system_2fe1595e-d35b-11e7-bf25-0264f6c60326_0

$ docker logs 0b81
2017/11/27 10:16:16 Starting overwatch
2017/11/27 10:16:16 Using in-cluster config to connect to apiserver
2017/11/27 10:16:16 Using service account token for csrf signing
2017/11/27 10:16:16 No request provided. Skipping authorization
2017/11/27 10:16:21 Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: the server has asked for the client to provide credentials
Refer to the troubleshooting guide for more information: https://github.com/kubernetes/dashboard/blob/master/docs/user-guide/troubleshooting.md

会出现什么问题?

enter image description here

加成

OS

CentOS 7

牧场主

v1.6.11

泊坞

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:41:23 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:49 2017
 OS/Arch:      linux/amd64
 Experimental: false

2 个答案:

答案 0 :(得分:1)

线索在您收到的信息中:

  

2017/11/27 10:16:21初始化与Kubernetes的连接时出错   API服务器。这很可能意味着群集配置错误   (例如,它具有无效的apiserver证书或服务帐户   配置)或--apiserver-host param指向服务器   不存在。 原因:服务器已请求客户端   提供凭据有关详细信息,请参阅故障排除指南   信息:   https://github.com/kubernetes/dashboard/blob/master/docs/user-guide/troubleshooting.md

服务器需要凭据,请阅读故障排除指南以了解如何更正它。

答案 1 :(得分:1)

降级docker版本,Rancher不支持您的版本。 阅读更多this link.