Skip to content

Instantly share code, notes, and snippets.

@timvw
Last active January 21, 2022 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timvw/3cde42f2e6ba4b559a789de93280cd35 to your computer and use it in GitHub Desktop.
Save timvw/3cde42f2e6ba4b559a789de93280cd35 to your computer and use it in GitHub Desktop.
Get token for k8s dashboard http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
kubectl -n kube-system get secret -o json | \
jq -r '.items[] | select(.metadata.name | startswith("deployment-controller-token")) | .data.token' | \
base64 --decode | \
pbcopy
kubectl -n kube-system get secret -o json | \
jq -r '.items[] | select(.metadata.name | startswith("eks-admin-token")) | .data.token' | \
base64 --decode | \
pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment