Created
March 31, 2018 23:18
-
-
Save rubencabrera/063652206f732aa7a6af9509231b72f1 to your computer and use it in GitHub Desktop.
Print kubernetes token (to access dashboard when using proxy)
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
# Your other aliases go here. | |
alias kubetoken="kubectl config view | grep -A10 \"name: \$(kubectl config current-context)\" | awk '\$1==\"access-token:\" {print \$2}'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can get the same string from the full output given by
kubectl config view
and looking for the value of the key access-token.