Skip to content

Instantly share code, notes, and snippets.

@allex
Forked from tonysneed/kubernetes-dashboard.md
Created August 2, 2021 15:08
Show Gist options
  • Save allex/933c10b3936aedde0c32247fdf57d3db to your computer and use it in GitHub Desktop.
Save allex/933c10b3936aedde0c32247fdf57d3db to your computer and use it in GitHub Desktop.
Kubernetes Dashboard
  1. Install the dashboard
    • Run: kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
  2. Create admin-user
    • Create a file named: dashboard-adminuser.yaml
    • Add this content:
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard
  1. Run: kubectl apply -f dashboard-adminuser.yaml
  2. Get the token
    • Run: kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}"
    • Copy the token
  3. Start the dashboard
    • Run: kubectl proxy
  4. Open the dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment