minkube 仪表板命令挂在“验证代理运行状况”上

mda*_*y77 19 kubernetes minikube

我正在学习 Kubernetes 课程,课程的一部分是尝试 minikube。我在 Windows 11 上的 Ubuntu 20.04 WSL 上安装了 minikube 和 kubectl。当我minikube dashboard在 Ubuntu 终端中运行时,进程挂起Verifying proxy health...。我尝试kubectl proxy在另一个终端窗口中运行然后运行minikube dashboard​​. 我转到仪表板 URL 并使用 kubectl proxy 命令指示的代理端口号,但我只得到以下信息:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "no endpoints available for service \"kubernetes-dashboard\"",
  "reason": "ServiceUnavailable",
  "code": 503
}
Run Code Online (Sandbox Code Playgroud)

我还尝试使用minikube start --vm-driver=dockerGitHub 问题中提到的方式运行 minikube ,但它仍然挂起。如何让仪表板运行?总的来说,我对 Kubernetes 完全陌生。

小智 11

对我来说,重新启动 minikube 后解决了同样的问题。

minikube stop
<close previously opened dashboard process> - for me ctrl+c in separate terminal, but maybe you'd have to kill it
minikube start
minikube dashboard
Run Code Online (Sandbox Code Playgroud)


ran*_*tlr -1

我必须这样做才能让它发挥作用:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

# Replace ClusterIP with NodePort (case sensitive)
kubectl edit svc kubernetes-dashboard -n kubernetes-dashboard
Run Code Online (Sandbox Code Playgroud)