Created
February 28, 2019 12:57
-
-
Save cmosh/d6559e663b615b11dc3d9f05b8f53a25 to your computer and use it in GitHub Desktop.
Command to generate kubernetes dashboard token and copy to clipboard on OSX
This file contains 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
#!/usr/bin/env bash | |
token=$(kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}') | grep token:) && echo ${token#"token:"} | xargs -n1 echo | pbcopy && pbpaste && echo "↑ token copied to clipboard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment