Is there a doc which demonstrates install and access to dashboard with DO-hosted k8s?

January 28, 2019 931 views
Kubernetes

I’ve not been able to figure out how to get access to the k8s dashboard with the DO-hosted k8s.

Commands:

helm install stable/kubernetes-dashboard --name k8s-dashboard
kubectl describe service kubernetes-dashboard
Name:              kubernetes-dashboard
Namespace:         kube-system
Labels:            k8s-app=kubernetes-dashboard
Annotations:       kubectl.kubernetes.io/last-applied-configuration:
                     {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"k8s-app":"kubernetes-dashboard"},"name":"kubernetes-dashboard"...
Selector:          k8s-app=kubernetes-dashboard
Type:              ClusterIP
IP:                10.245.134.109
Port:              <unset>  443/TCP
TargetPort:        8443/TCP
Endpoints:         <none>
Session Affinity:  None
Events:            <none>
kubectl proxy
Starting to serve on 127.0.0.1:8001

But when I hit the URL with as an http or https URL I just get the API and no UI.

1 comment
  • Sorry to hijack this thread, I’ve got dashboard going, but I can’t seem to authenticate with the provided kubeconfig file

    When I try to sign in with the downloaded YAML file I get the message:
    Not enough data to create auth info structure.

2 Answers

CORRECTION:

seems you’re installing via helm so it should have created the necessary sa.

just try navigating here after kubectl proxy

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview?namespace=default

================
You need to give it cluster-admin access I think

kubectl create sa kubernetes-dashboard --namespace=kube-system
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard

should be able to access after that and doing your steps in this url:

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview?namespace=default
Have another answer? Share your knowledge.