Dashboard: Error deploying Kubernetes dashboard from the samples

Created on 17 Mar 2018  路  4Comments  路  Source: kubernetes/dashboard

Environment

Running

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernetes-dashboard.yaml

from the README

Dashboard version: 1.8.3
Kubernetes version: Client 1.9.4 / Server 1.9.0 from Brew distribution
Operating system: OSX
Node.js version: 8.9.1
Go version: (not globally installed)

Steps to reproduce

Installed kubectl and minikube from brew. Tried to deploy the dashboard on minikube via the shortcut from the README

Observed result
serviceaccount "kubernetes-dashboard" unchanged
role "kubernetes-dashboard-minimal" unchanged
rolebinding "kubernetes-dashboard-minimal" unchanged
service "kubernetes-dashboard" configured
The Deployment "kubernetes-dashboard" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"k8s-app":"kubernetes-dashboard"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
Expected result

It should start the dashboard

Comments

Checked the document and it says Kubernetes 1.8 is supported. Don't know if that's the case with 1.9x

Most helpful comment

Obviously this error is caused because dashboard is already provisioned in minikube. Didn't know at the time I was writing this ticket.

All 4 comments

Obviously this error is caused because dashboard is already provisioned in minikube. Didn't know at the time I was writing this ticket.

To access the dashboard with minikube:

minikube dashboard

@Fohlen hello,I also met this problem. How did you solve this problem?

dev@ubuntu:/work/dev/project/angular-pen/dashboard$ sudo minikube dashboard
Opening http://127.0.0.1:41419/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...
[7680:7680:0220/105136.264971:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
[7690:7690:0220/105136.290613:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Running Firefox as root in a regular user's session is not supported. ($HOME is /home/dev which is owned by dev.)
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found
[7723:7723:0220/105136.475221:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://127.0.0.1:41419/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/'
failed to open browser: exit status 3

^C
dev@ubuntu:/work/dev/project/angular-pen/dashboard$ sudo kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
secret/kubernetes-dashboard-certs unchanged
serviceaccount/kubernetes-dashboard unchanged
role.rbac.authorization.k8s.io/kubernetes-dashboard-minimal unchanged
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard-minimal unchanged
service/kubernetes-dashboard configured
The Deployment "kubernetes-dashboard" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"k8s-app":"kubernetes-dashboard"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
dev@ubuntu:/work/dev/project/angular-pen/dashboard$

For me using Linux ubuntu xenial with with virtualBox 6 (painful signing of kernel and virtualization certificates). I took these steps:
Ffollowed every single command given by the edx.org online course
The CLI told me there is a new minikube version so i got the newer version
when did the kubectl apply it got stuck in this step:
secret/kubernetes-dashboard-certs created
i tried to access the dashboard by runnin the kubectl proxy and it told me the service was not available
so i just minikube stop/start
repeated the dashboard steps
minikube dashboard
now it works

reason of the issue: followed linkedIn training plus edx.org training at the same time and got overwhelmed.

What do you think if i create a blog with a simple BPMN diagram describing the steps and commands to run in each step??

Was this page helpful?
0 / 5 - 0 ratings