Created
August 25, 2019 10:17
-
-
Save zeusbaba/9ae12a18b01962e5df64ec701732c7d1 to your computer and use it in GitHub Desktop.
web-ui-dashboard on DO-k8s cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deploy the latest dashboard, v2-beta3 | |
$kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta3/aio/deploy/recommended.yaml | |
# for accessing it, you need to | |
$kubectl proxy | |
# now it is accessible via | |
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ | |
# NB! if you get default is not accessible error in dashboard, then create 'default' namespace with | |
$kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default | |
# ... | |
# Only authentication options specified by --authentication-mode flag is supported in kubeconfig file. | |
# You can auth with token (any token in kube-system namespace): | |
$kubectl get secrets -n kube-system | |
$kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}' | |
# get this K8S_TOKEN, and place it inside kubeconfig, as seen below | |
``` | |
users: | |
- name: kubernetes-admin | |
user: | |
client-certificate-data: REDACTED | |
client-key-data: REDACTED | |
token: K8S_TOKEN | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment