Suggested new alias
#10706
Replies: 2 comments
-
Looks like an advanced alias, maybe should be placed in your |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm assuming based on the use of pbcopy, it is limited to MacOS? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am not sure how this would look, but I almost always use this same kubectl command on most clusters. It retrieves the dashboard login secret token from the K8s cluster. It would be nice to see if there was a way to get it added into the regular plugin so I don’t need to add it every time, and others can benefit also:
Kubernetes Get Dashboard Token:
alias kgdt=‘kubectl get secret -n kubernetes-dashboard $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath=“{.secrets[0].name}”) -o go-template=“{{.data.token | base64decode}}” | pbcopy; echo Dashboard Token added to clipboard’
This requires the dashboard set up in the standard way according to Kubernetes directions, with the default access account, so it is not appropriate for all users, but hopefully somebody can do something with this code
Beta Was this translation helpful? Give feedback.
All reactions