Skip to content

How To Install Dashboard

Check the docs

  • Enable bootstrap token auth - kube-apiserver

Kube-apiserver

Bash
sudo nano /etc/kubernetes/manifests/kube-apiserver.yaml
Bash Session
    - --enable-bootstrap-token-auth
  • Dashboard
Bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml
  • Service Account (admin-kubernetes-dashboard.yaml)
YAML
apiVersion: v1
kind: ServiceAccount
metadata:
  name: dashboard-admin
  namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: cluster-admin-rolebinding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: dashboard-admin
  namespace: kubernetes-dashboard
  • Create token (save it)
Bash
kubectl -n kubernetes-dashboard create token dashboard-admin
  • From local machine
Bash
kubectl proxy
  • Open in browser
Text Only
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login