Skip to content

Instantly share code, notes, and snippets.

@tonysneed
Last active August 2, 2021 15:08
Show Gist options
  • Save tonysneed/0dcd6e6b49e409a0e3da5163d5eb8117 to your computer and use it in GitHub Desktop.
Save tonysneed/0dcd6e6b49e409a0e3da5163d5eb8117 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