Provision a container using Azure Container Instances
Azure Container Instances (ACI) provides a way to deploy isolated containers quickly and simply without worrying about backend infrastructure. It is widely used to spin up containers quickly for activities such as task automation, build jobs, and so on.
There are multiple ways to create ACI. You can use the Azure portal, PowerShell, Azure CLI,ARM templates, or Bicep files.
Create ACI
To create Azure container instances from the Azure portal, search for Container Instances. On the Container Instances blade, select Create.
As shown in Figure 3-44, you can fill in the details, such as Subscription, Resource Group, Region, and so on. Choose the Image Source for your container instance. You can select the available image using QuickStart Images, Azure Container Registry (ACR), or Docker Hub registry.
FIGURE 3-44 Basics tab of the Create Container Instance blade
On the Networking tab, set the Networking Type to Public, Private, or None (see Figure 3-45). If you choose Public, you will be asked to provide a DNS Name label for your public IP. You can also select the ports for your container instances.
On the Advanced tab, define the Restart Policy for your containers. The Restart Policy determines when the container would restart. You can choose On Failure, Always, or Never (see Figure 3-46). Choosing Always means your containers will restart irrespective of how they are stopped. Choosing On Failure means your containers restart only if they failed earlier, and choosing Never means your containers never restart.
FIGURE 3-45 Networking tab for the Create Container Instance blade
FIGURE 3-46 Advanced tab of the Create Container Instance blade
Once the container instance is created, the Azure Container Instance overview page will look similar to the one shown in Figure 3-47.
FIGURE 3-47 Azure container instances in the Azure portal
Connect to ACI
To review container events, properties, and logs, click Containers under Settings, as shown in Figure 3-48.
FIGURE 3-48 Containers blade for ACI
You can connect to containers directly from the Azure portal, as shown in Figure 3-49. You can choose between shell environments (bash and sh) to start interacting with containers.
FIGURE 3-49 Azure container instances in the Azure portal
Note that you can use Azure PowerShell and the CLI to interact with the containers as well.
Provision a container using Azure Container Apps
Azure Container Apps (ACA) is an Azure PaaS service that is built on top of Kubernetes to provide a serverless container platform. However, unlike Azure Kubernetes Services or other Kubernetes-based platforms, the underlying nodes are not visible or managed by you. As a PaaS service, the nodes, orchestration, and other infrastructure components are managed by Azure. Because of this, the underlying Kubernetes APIs and control plane are not accessible when using ACA.
ACA has several Kubernetes and open-source tools integrated directly into the service, such as Dapr, KEDA, and envoy. You can deploy your Kubernetes-style apps and microservices and build on them using service discovery and traffic splitting, as well as jobs that can be on demand, scheduled, or event-driven.