Skip to content

Instantly share code, notes, and snippets.

@tanelmae
Created October 29, 2018 15:08
Show Gist options
  • Save tanelmae/2f0655e0f445dabf4d9f6b02055ce8e9 to your computer and use it in GitHub Desktop.
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
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