Skip to content

Commit 9e68f1e

Browse files
Updated Service Principal on Windows section 18-02
Updated Service Principal on Windows section 18-02
1 parent 9b6f3aa commit 9e68f1e

File tree

1 file changed

+10
-1
lines changed
  • 18-Azure-Container-Registry-ACR/18-02-ACR-not-attached-to-AKS-Schedule-to-NodePools

1 file changed

+10
-1
lines changed

18-Azure-Container-Registry-ACR/18-02-ACR-not-attached-to-AKS-Schedule-to-NodePools/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ SP_APP_ID=$(az ad sp show --id http://$SERVICE_PRINCIPAL_NAME --query appId --ou
139139
echo "Service principal ID: $SP_APP_ID"
140140
echo "Service principal password: $SP_PASSWD"
141141
```
142+
### Using Windows
143+
```sh
144+
$ACR_NAME='aks2021'
145+
$SERVICE_PRINCIPAL_NAME='acr-sp-demo'
146+
$ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
147+
148+
$SP_PASSWD=$(az ad sp create-for-rbac --name http://$SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role acrpull --query password --output tsv)
149+
$SP_APP_ID=$(az ad app list --display-name http://$SERVICE_PRINCIPAL_NAME --query [].appId --output tsv)
150+
```
142151

143152
## Step-06: Create Image Pull Secret
144153
```
@@ -202,4 +211,4 @@ kubectl delete -f kube-manifests/
202211

203212
## References
204213
- [Azure Container Registry Authentication - Options](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication)
205-
- [Pull images from an Azure container registry to a Kubernetes cluster](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-kubernetes)
214+
- [Pull images from an Azure container registry to a Kubernetes cluster](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-kubernetes)

0 commit comments

Comments
 (0)