0

When I run command to create kubernetes dashboard it throws below error

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml error: error parsing https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml: error converting YAML to JSON: yaml: line 8: did not find expected document start

I downloaded the yaml file and tried

ERROR: kubectl create -f kubernetes-dashboard.yaml error: error parsing kubernetes-dashboard.yaml: error converting YAML to JSON: yaml: line 25: mapping values are not allowed in this context

Could someone please assist on this?

Community
  • 1
  • 1
sushma
  • 43
  • 1
  • 6
  • Just look at the attached "YAML file content" again. It doesn't look like YAML, does it? Looks like you have downloaded the whole html page instead of particular YAML file, so it's no surprise you failed the validation – Konstantin Vustin Oct 09 '18 at 11:14
  • Please take a look at this issue: https://stackoverflow.com/questions/16482875/you-cannot-define-a-mapping-item-when-in-a-sequence-when-running-phpunit-in-sy Seems like you have invalid yaml starting from: `rules: - apiGroups: [""] resources: ["secrets"] verbs: ["create"]` – Sergii Vorobei Oct 09 '18 at 11:21
  • @sushma, Can you share your cluster information: `kubectl cluster-info` and kubectl version: `kubectl version` ? – Nick_Kh Oct 09 '18 at 13:59
  • @mk_sta Please find below details [kubectl cluster-info Kubernetes master is running at https://192.168.61.123:6443 KubeDNS is running at https://192.168.61.123:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy] – sushma Oct 10 '18 at 05:48
  • **kubectl version Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:46:06Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:36:14Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}** – sushma Oct 10 '18 at 05:50
  • I was able to validate this manifest file with the same `kubectl` version. Can you check `kube-system` components health state: `kubectl get all --all-namespaces` ? What tool have you used to bootstrap your cluster? (kubeadm, minikube, etc.) – Nick_Kh Oct 12 '18 at 10:27
  • have you opened an issue to the repo instead? – ahmet alp balkan Oct 30 '18 at 20:53

0 Answers0