Skip to content

Instantly share code, notes, and snippets.

@KyleJamesWalker
Created October 25, 2019 21:05
Show Gist options
  • Save KyleJamesWalker/60483ffa4f1b88e710d2a6ed6b84516c to your computer and use it in GitHub Desktop.
Save KyleJamesWalker/60483ffa4f1b88e710d2a6ed6b84516c to your computer and use it in GitHub Desktop.
Install K8s Dashboard

Install

# Install the dashboard
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml
# Create a user
kubectl create serviceaccount dashboard-admin-sa
kubectl create clusterrolebinding dashboard-admin-sa \
  --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa
# Get the jwt. Note: use tab complete for the `-xxxxx`
kubectl describe secret dashboard-admin-sa-token-xxxxx
# Load
kubectl proxy
open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#
@KyleJamesWalker
Copy link
Author

KyleJamesWalker commented Oct 29, 2019

One-liner to get in!

kubectl describe secret dashboard-admin-sa-token-xxxxx; kubectl proxy&; open "http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"; fg %1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment