minikube仪表板在macOS上返回503错误

时间:2018-10-21 14:50:48

标签: kubernetes minikube macos-mojave

我最近使用自制软件在新Mac上安装了minikube和VirtualBox。我正在按照official minikube tutorial的说明进行操作。

这就是我启动集群的方式-

minikube start --vm-driver=hyperkit

在运行kubectl cluster-info时我明白了

Kubernetes master is running at https://192.168.99.100:8443
CoreDNS is running at https://192.168.99.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

然后我设置minikube的上下文

kubectl config use-context minikube

但是当我运行minikube dashboard时,要花费很多时间才能得到任何输出,最终我得到了这个输出-

http://127.0.0.1:50769/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ is not responding properly: Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503

我希望看到minikube集群的Web UI,但会收到错误输出。我在做错什么吗?

更多信息-
作业系统:macOS Mojave(10.14)
使用gcloud sdk安装了kubectl命令。

更新
kubectl cluster-info dump

的输出
Unable to connect to the server: net/http: TLS handshake timeout

kubectl get podskubectl get pods --all-namespaces的输出

The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?

6 个答案:

答案 0 :(得分:19)

停止minikube:

minikube stop

清理当前的minikune配置和数据(不起作用或变坏)

rm -rf  ~/.minikube

再次启动minikube :(一个新实例)

minikube start

答案 1 :(得分:8)

我认为与xhyve冲突的VirtualBox网络出了点问题,我建议您完全uninstall VirtualBox。为Mac安装docker并安装hyperkit driver

本质上,Hyperkit不使用VirtualBox,但使用xhyve Hypervisor。

它适用于我为Mac和hyperkit driver安装docker

$ kubectl cluster-info
Kubernetes master is running at https://192.168.64.2:8443
CoreDNS is running at https://192.168.64.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
$ minikube dashboard
Opening http://127.0.0.1:55919/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...

答案 2 :(得分:2)

我有相同的问题,我的环境与您的环境相同。

?  Enabling dashboard ...
?  Verifying dashboard health ...
?  Launching proxy ...
?  Verifying proxy health ...
?  http://127.0.0.1:52582/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ is not responding properly: Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503

  • MacOS 10.13.6
  • 适用于Mac的Docker桌面
  • VirtualBox
  • Kubernetes v1.15.2

我的解决方法如下:

  1. 删除现有的VM

minikube delete -p minikube

  1. 启动minikube

minikube start

  1. 仪表板有问题吗?

mushuweideMacBook-Pro:tools mushuwei$ minikube dashboard
?  Verifying dashboard health ...
?  Launching proxy ...
?  Verifying proxy health ...
?  Opening http://127.0.0.1:53414/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...

enter image description here 希望我的经验对您有所帮助!

答案 3 :(得分:1)

我认为您应该删除现有的一个。只需运行minikube delete -p minikube。删除后,启动新的minikube集群

答案 4 :(得分:1)

这很奇怪,但是安装一个新的minikube是可行的。不知道全新安装后解决的问题是什么。

答案 5 :(得分:0)

如果您只想尝试使用仪表板,则可以使用kubectl proxy运行代理,并在http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/中访问它