Created
October 29, 2018 15:08
-
-
Save tanelmae/2f0655e0f445dabf4d9f6b02055ce8e9 to your computer and use it in GitHub Desktop.
Give cluster-admin role to current local user to the current kubectl context
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
function admin-me() { | |
kubectl create clusterrolebinding $(whoami)-admin-binding \ | |
--clusterrole=cluster-admin \ | |
--user=$(gcloud config get-value core/account) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment