Kubernetes: cant install Dashboard

2/24/2017

When I am trying to install Dashboard, I am getting error like this

`[root@ts ~]# kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml

error validating

"https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml": error validating data: [unexpected type: object, unexpected type: unversioned.LabelSelector, unexpected type: object, unexpected type: object]; if you choose to ignore these errors, turn validation off with --validate=false`

How to resolve this? I have used these commands before installing dashboard

kubeadm reset
rm -rf ~/.kube
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi -f $(docker images -q)
kubeadm init
-- verma_neeraj
containers
dashboard
docker
kubernetes
linux

1 Answer

8/19/2018

The page you're using, https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml seems to be a 404. The github page for the dashbard project says;

"Since version 1.7 Dashboard uses more secure setup"

And gives a different link - try using this one instead https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml instead.

If that doesn't work for you, save the content of that second link to a yaml file and run the same kubectl create -f dashboard.yaml command

-- sethmccombs
Source: StackOverflow