0

I have used AWS Fargate previously for deploying a docker image as 10+ tasks in a cluster. Now I want to do the same on Azure. I have been successful to run the image on a container group but I want to create replicas of the container group just like on AWS it's possible to run multiple tasks.

Can anyone suggest how to achieve the same on Azure ?

Also if I want to scale the container groups how could I do that ? (just like on AWS scaling policies and auto-scaling groups were there)

2 Answers2

0

A container group (POD in AKS) is a collection of containers that get scheduled on the same host machine. The containers in a container group share a lifecycle, resources, local network, and storage volumes. It's similar in concept to a pod in Kubernetes.

Question: How to create replicas of the container group in Azure?

Answer: Here are two common ways to deploy a multi-container group

1.Resource Manager template

A Resource Manager template is recommended when you need to deploy additional Azure service resources (for example, an Azure Files share)

2.YAML file.

The YAML format's is more concise nature, a YAML file is recommended when your deployment includes only container instances. Reference: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-groups

These two tool you can use to scale the container groups one is Most Popular AKS and Docker Swarm. But I will suggest you use AKS because docker swarm is limited for scaling docker container only while AKS is use for scaling all types of containers. example Container D, Rocket Container and Docker Container. AKS uses POD to keep the container. So here we can assume container group with pods name. By default, AKS is not set for auto scaling or healing but using high level of Kubernetes object like Replication set we can auto scale. Kubernetes supports horizontal pod autoscaling.

Follow this link for auto scaling pods using Kubernetes: https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-scale?tabs=azure-cli#autoscale-pods

RahulKumarShaw
  • 4,192
  • 2
  • 5
  • 11
0

It sounds like Azure Web App for Containers is what you're looking for. Like Fargate, you just point it to your image repository and which image version it should use.

Controlling the number of instances is either done manually using a slider:

enter image description here (this can also be done using the Azure CLI).

...or automatically based on conditions on certain metrics.

And like Fargate, Azure Webapps for Containers also provide various ways of side-by-side deployments (called deployment slots) that you can route part of your traffic to.

Although all of this could also be achieved using K8S (as mentioned by others), I think Webapps For Containers is probably the more "1-to-1 equivalent" of Amazons Fargate.

John Knoop
  • 605
  • 5
  • 16