message: "services "kubernetes-dashboard" not found",

10/6/2020

Kubernetes Dashboard docs ( https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ ) say: Kubectl will make Dashboard available at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/. but I get this when using that URL:

{
kind: "Status",
apiVersion: "v1",
metadata: { },
status: "Failure",
message: "services "kubernetes-dashboard" not found",
reason: "NotFound",
details: {
name: "kubernetes-dashboard",
kind: "services"
},
code: 404
}

FYI

[vagrant@master ~]$ kubectl get all -n kube-system
NAME                                            READY   STATUS    RESTARTS   AGE
pod/coredns-54f8cbd98d-92d2m                    1/1     Running   0          19m
pod/coredns-54f8cbd98d-v487z                    1/1     Running   0          19m
pod/etcd-master.vagrant.vm                      1/1     Running   0          19m
pod/kube-apiserver-master.vagrant.vm            1/1     Running   0          18m
pod/kube-controller-manager-master.vagrant.vm   1/1     Running   1          19m
pod/kube-flannel-ds-2tr49                       1/1     Running   0          18m
pod/kube-flannel-ds-552d5                       1/1     Running   0          13m
pod/kube-flannel-ds-dbv5p                       1/1     Running   0          16m
pod/kube-proxy-29l59                            1/1     Running   0          13m
pod/kube-proxy-ctsnx                            1/1     Running   0          16m
pod/kube-proxy-swxhg                            1/1     Running   0          19m
pod/kube-scheduler-master.vagrant.vm            1/1     Running   1          19m
pod/kubernetes-dashboard-86b8d78468-6c52b       1/1     Running   0          19m
NAME                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
service/kube-dns               ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP   19m
service/kubernetes-dashboard   ClusterIP   10.103.110.54   <none>        443/TCP         19m
NAME                             DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                   AGE
daemonset.apps/kube-flannel-ds   3         3         3       3            3           beta.kubernetes.io/arch=amd64   19m
daemonset.apps/kube-proxy        3         3         3       3            3           <none>                          19m
NAME                                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/coredns                2         2         2            2           19m
deployment.apps/kubernetes-dashboard   1         1         1            1           19m
NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/coredns-54f8cbd98d                2         2         2       19m
replicaset.apps/coredns-85d6cff8d8                0         0         0       19m
replicaset.apps/kubernetes-dashboard-86b8d78468   1         1         1       19m
-- Snowcrash
kubernetes
kubernetes-dashboard

1 Answer

10/6/2020

The docs are probably not updated. Since the service is created in kube-system namespace you can use below

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
-- Arghya Sadhu
Source: StackOverflow