minikube 仪表板 returns macOS 上的 503 错误

minikube dashboard returns 503 error on macOS

我最近使用自制软件在新的 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的context

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 集群的网络 UI,但收到错误输出。我做错了什么吗?

更多信息 -
OS: macOS 莫哈韦沙漠 (10.14)
kubectl 命令是使用 gcloud sdk 安装的。

更新
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?

我认为 VirtualBox 网络有问题,与 xhyve, I recommend you completely uninstall VirtualBox. Install docker for mac and install the hyperkit driver

冲突

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

我为 mac 安装 docker 和 hyperkit driver

$ 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...

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

中访问它

停止 minikube:

minikube stop

清理当前的 minikune 配置和数据(它不工作或坏了)

rm -rf  ~/.minikube

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

minikube start

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

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

我也遇到了同样的问题,我的环境和你一样

  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
  • Docker mac
  • 的桌面
  • 虚拟盒子
  • Kubernetes v1.15.2

我的解决方案如下:

  1. 删除现有虚拟机

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 希望我的经验对你有用!

我遇到了同样的问题。通过将驱动程序更改为最新的 hyperkit 驱动程序,我的问题已解决。

issue discussed in github