Skip to content

Commit

Permalink
02
Browse files Browse the repository at this point in the history
  • Loading branch information
Houssem Dellai committed Sep 23, 2024
1 parent 8fffc98 commit 817ff94
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions 02_kubernetes_aks/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down

0 comments on commit 817ff94

Please sign in to comment.