我已经按照https://kubernetes.io/docs/tasks/tools/install-minikube/
的说明在MacOS上部署了minikube。酿造安装正常,并且显示minikube状态
$ minikube status
host: Running
kubelet: Running
apiserver: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.102
我能够使用kubectl与集群进行交互
$kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.10 --port=8080
也可以查看豆荚
$kubectl get pod
NAME READY STATUS RESTARTS AGE
hello-minikube-856979d68c-glhsx 1/1 Running 0 18m
但是当我尝试启动kubectl仪表板时,出现503错误
$minikube dashboard
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
仪表板服务似乎已经出现
$kubectl -n kube-system get svc -o wide
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 3h19m k8s-app=kube-dns
kubernetes-dashboard ClusterIP 10.109.210.119 <none> 80/TCP 119m app=kubernetes-dashboard
下面是kubectl版本信息
$kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T16:57:42Z", GoVersion:"go1.12.7", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:15:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
关于缺少什么的任何指针?如何使仪表板正常工作
谢谢
Praveen
答案 0 :(得分:1)
答案 1 :(得分:1)
尝试$ minikube dashboard
命令。它将在您的默认浏览器中打开一个新标签,显示minikube dashbord。
答案 2 :(得分:0)
最终能够按照GitHub问题的说明解决此问题 https://github.com/kubernetes/minikube/issues/4352
基本上,使用这些命令
minikube stop
minikube start --extra-config=apiserver.authorization-mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard