Azure Container Registry, Container Instance

  Azure Container Registry It allows you to build, store and manage container images and artifacts in private registry for all types of cont...

 Azure Container Registry

It allows you to build, store and manage container images and artifacts in private registry for all types of container deployments.


Step 1: Create a virtual machine in Azure of ubuntu type to connect with Azure Container registry.

Step 2: Install Docker on the above VM.

             apt update

             apt install -y

Step 3: Create a container registry by searching container registries on Azure portal. Registry name I am using myreg100

Step 4: Install Azure CLI on your vm and push docker image to azure registry.

Install Azure CLI

curl -sL | gpg --dearmor |  sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null

AZ_REPO=$(lsb_release -cs)

echo "deb [arch=amd64] $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list

sudo apt-get update

sudo apt-get install azure-cli

Login to Azure using CLI (After running this command you need to follow the instruction to connect with Azure CLI)

sudo az login

Log in to your container registry

sudo az acr login --name myreg100

Pull a Docker image and push it docker registry      

sudo docker pull nginx
sudo docker tag nginx

Push the image to Azure Container registry and once pushed then check the container registry ---> Repositories and you will find mynginx image is available.

sudo docker push

Container Instance

To deploy an application in azure as container you can use Container instance.

Step 0: Goto Container registry and select your repository (myreg100) and select Access keys and enabled for Admin user

Step 1: Go to Azure portal and search for the container instance.

           Select container registry image :- myreg100

           Open Port no: 80

Step 2: Once Container is created it will give you the Public IP address and use this IP address on the browser you will be able to see nginx web page.

AKS (Azure Kubernetes Cluster )

To Deploy Containers on AKS we follow the below steps

Step 1: Search for Kubernetes service on the Azure portal.

Step 2: Create Kubernetes cluster by using container image - myreg100

            It will take around 5-10 mins to create the cluster

Step 3: Once Cluster is created then Select Workloads--> Create-->ADD Yaml for deployment

apiVersion: apps/v1
kind: Deployment
  name: nginx-deployment
    app: nginx-app
  replicas: 1
      app: nginx-app
        app: nginx-app
      - name: nginx-container
        - containerPort: 80

Step4: Add another yaml file for services

apiVersion: v1
kind: Service
  name: my-service
    app: nginx-app
    app: nginx-app
  type: LoadBalancer
  - port: 80
    targetPort: 80

Step 5: In Services and Ingress you will find an External IP for your deployment use that IP address to access the deployment.



Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,git quiz,1,Git Worksheet,1,Jira,3,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SDLC Quiz,4,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
DevOpsWorld: Azure Container Registry, Container Instance
Azure Container Registry, Container Instance
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content