Created
May 10, 2019 09:38
-
-
Save yuriburger/4337d770ed7d1ccda30daf2e180bc128 to your computer and use it in GitHub Desktop.
[grant aks access to acr] Grant Azure Kubernetes Service pull access to Azure Container Registry #kubernetes #azure
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
// vim: syntax=bash | |
# Get the id of the service principal configured for AKS | |
CLIENT_ID=$(az aks show -g <resource group> -n <aks cluster> --query "servicePrincipalProfile.clientId" --output tsv) | |
# Get the ACR registry resource id | |
ACR_ID=$(az acr show -g <resource group> -n <name acr> --query "id" --output tsv) | |
# Create role assignment | |
az role assignment create --assignee $CLIENT_ID --role acrpull --scope $ACR_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment