From 817ff949ec0701ceabbf6cfc22fbc82c155800d0 Mon Sep 17 00:00:00 2001 From: Houssem Dellai Date: Mon, 23 Sep 2024 15:06:13 +0200 Subject: [PATCH] 02 --- 02_kubernetes_aks/Readme.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/02_kubernetes_aks/Readme.md b/02_kubernetes_aks/Readme.md index d5454c2..9aac707 100644 --- a/02_kubernetes_aks/Readme.md +++ b/02_kubernetes_aks/Readme.md @@ -96,13 +96,17 @@ kubectl get svc ## 4. Building and deploying container images in ACR -Instead of using a public registry like Docker Hub, you can create your own private registry in Azure where you push your own private images. +Instead of using a public registry like `Docker Hub`, you can create your own private registry in Azure where you push your own private images. ### 4.1. Creating a container registry in Azure (ACR) -Follow this link to create an ACR using the portal: [docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal). +Follow this link to create an `ACR` using the portal: [docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal). Or this link to create it through the command line: [docs.microsoft.com/en-us/azure/container-registry/container-registry-event-grid-quickstart](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-event-grid-quickstart). +```sh +az acr create --name acraks013579 --sku Standard +``` + ### 4.2. Building an image in ACR You can use `docker build` to build an image in your local machine, assuming you have docker installed. @@ -116,6 +120,8 @@ az acr build -t "$acrName.azurecr.io/dotnet-app:1.0.0" -r $acrName . This will build and push the image to ACR. +az aks attach + ### 4.3. Deploying an image from ACR Deploy the created image in ACR into the AKS cluster and replace image and registry names: