Skip to content

Instantly share code, notes, and snippets.

@cwoolum
Last active January 6, 2019 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwoolum/cac8aea63fec729d5ab8d210855afdf4 to your computer and use it in GitHub Desktop.
Save cwoolum/cac8aea63fec729d5ab8d210855afdf4 to your computer and use it in GitHub Desktop.
AKS-Deploy Part 3
spPass="$(openssl rand -base64 30)"
echo "Creating Service Principal"
spId="$(az ad sp create-for-rbac --name sp-kube-api-$envName --password $spPass --skip-assignment --query appId --output tsv)"
echo "Setting permissions for Service Principal on VNet"
az role assignment create --assignee $spId --scope $vNetResourceId --role Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment