Setting up Azure Container Registry (ACR) to any project or deployment in stream lined - kondareddypp/azure-network-fundamentals GitHub Wiki
Setting up Azure Container Registry (ACR) is straightforward and allows you to manage container images efficiently. Here's a step-by-step guide:
-
Sign in to Azure Portal:
- Go to the Azure Portal.
-
Create a Resource:
- Select Create a resource > Containers > Container Registry.
-
Fill in the Basics:
- Choose a Resource Group or create a new one.
- Enter a unique Registry Name (5-50 alphanumeric characters).
- Select a SKU (Basic, Standard, or Premium) based on your needs.
-
Review and Create:
- Click Review + Create and then Create to deploy the registry.
-
Using Azure CLI:
- Install the Azure CLI.
- Log in to Azure:
az login
- Log in to the registry:
az acr login --name <registry-name>
-
Using Docker:
- Ensure Docker is installed and running.
- Log in with Docker:
docker login <registry-name>.azurecr.io
-
Tag the Image:
- Tag your Docker image with the registry's login server:
docker tag <image-name> <registry-name>.azurecr.io/<image-name>:<tag>
- Tag your Docker image with the registry's login server:
-
Push the Image:
- Push the tagged image to ACR:
docker push <registry-name>.azurecr.io/<image-name>:<tag>
- Push the tagged image to ACR:
-
Pull the Image:
- Use Docker to pull the image:
docker pull <registry-name>.azurecr.io/<image-name>:<tag>
- Use Docker to pull the image:
-
Grant AKS Access to ACR:
- Link your AKS cluster to ACR:
az aks update -n <aks-cluster-name> -g <resource-group> --attach-acr <registry-name>
- Link your AKS cluster to ACR:
-
Deploy Images to AKS:
- Use Kubernetes manifests to deploy images from ACR.
Let me know if you'd like help with any specific step or further details!