Skip to content

Deploying toAzure Container Instances

Alec Clews edited this page Jun 8, 2021 · 1 revision

Deploying Containers in the Cloud

Deploying containers in the cloud can be be complex at scale, and uses complex orchestration tools (i.e. Kubernetes).

Recently cloud providers such as Microsoft and Google have provided tools to make it much easier to deploy containers in the cloud without using tools such as Kubernetes.

This bonus module briefly shows how this type of platform works. We are going to take some of the code we used in previous examples and deploy it to the cloud using Azure Container Instances.

Running on Azure Container Instances provides the following benefits

  1. Secure SSL traffic provided out of the box. No need to obtain a public certificate

  2. Zero admin and always up. The service, once working, requires no further maintenance.

This information is adapted from the Quickstart Guide

Setup PowerShell

At the PowerShell prompt

Install the Azure Az PowerShell module

This can take some time. More information at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps

Authenticate to the Azure service

Connect-AzAccount

Note:

You may need to connect to specific account subscription e.g.

Connect-AzAccount -Subscription sub1

Create a resource group

New-AzResourceGroup -Name myCloudResource -Location EastUS

Create the image

docker image build --tag myazureimage:0.1 FileSetA

Copy the container to Azure

New-AzContainerGroup -ResourceGroupName myCloudResource -Name myAzurecontainer -Image myazureimage:0.1 -OsType Linux -DnsNameLabel my-demo-01

Clone this wiki locally