File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,18 @@ az acr build -t "$acrName.azurecr.io/webapp:1.0" -r $acrName ../app-dotnet
284
284
285
285
Note that image is already pushed to ACR by viewing the ACR resource in Azure portal.
286
286
287
+ If you have an AKS cluster, you can connect it to ACR so that the cluster can pull images from ACR without requiring credentials.
288
+
289
+ ``` sh
290
+ az aks update -n < your-aks-cluster-name> -g < your-resource-group> --attach-acr $acrName
291
+ ```
292
+
293
+ Then you can run the image in your AKS cluster without providing credentials.
294
+
295
+ ``` sh
296
+ kubectl run webapp --image=$acrName .azurecr.io/webapp:1.0 --port=80
297
+ ```
298
+
287
299
## Conclusion
288
300
289
301
In this lab, you learned how to create a container image from an existing application source code.
You can’t perform that action at this time.
0 commit comments