Skip to content

Instantly share code, notes, and snippets.

@tanelmae
Created October 29, 2018 13:58
Show Gist options
  • Save tanelmae/091d54c12aa80e79754f46da34a1ff63 to your computer and use it in GitHub Desktop.
Save tanelmae/091d54c12aa80e79754f46da34a1ff63 to your computer and use it in GitHub Desktop.
Deployment Manager GKE permissions
#!/usr/bin/env bash
CURRENT_PROJECT=$(gcloud config get-value project)
PROJECT_NUMBER=$(gcloud projects describe ${CURRENT_PROJECT} --format='value(projectNumber)')
SERVICE_ACCOUNT="${PROJECT_NUMBER}@cloudservices.gserviceaccount.com"
kubectl create clusterrolebinding dm-admin-binding --clusterrole=cluster-admin --user=${SERVICE_ACCOUNT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment