Practice Test

True or False: Azure Container Instances (ACI) allows you to run Docker containers directly within Azure, without requiring any virtual machine infrastructure.

  • True
  • False

Answer: True.

Explanation: ACI is designed for developers who need fast, ephemeral compute that can start in seconds as well as for any scenario that can operate in isolated containers, including build jobs, event-driven applications, and microservices.

True or False: Azure Container Instances (ACI) is a fully managed Azure service that uses virtual machines to run containers.

  • True
  • False

Answer: False.

Explanation: ACI is a serverless container runtime that enables you to run and scale containerized applications without needing to provision and manage servers.

You can only deploy a single container in Azure Container Instances (ACI). True or False?

  • True
  • False

Answer: False.

Explanation: Azure Container Instances enables the running of multi-container groups where containers share the same network, storage, and lifecycle.

Which of these are elements of the YAML file used to configure Azure Container Instances? Select all that apply.

  • a) Containers
  • b) Volumes
  • c) Bot packages
  • d) Restart policy

Answer: a) Containers, b) Volumes, d) Restart policy.

Explanation: A YAML file for Azure Container Instances contains information about the containers, volumes, and restart policy. Bot packages do not form part of the YAML file.

True or False: You cannot assign a DNS name label directly in the YAML file for an Azure container instance group.

  • True
  • False

Answer: False.

Explanation: You can assign a DNS name label directly in the YAML file for an Azure container instance group.

True or False: You can execute commands directly in a running container of an Azure Container Instance (ACI).

  • True
  • False

Answer: True.

Explanation: The Azure CLI `az container exec` command can be used to run commands inside a running container.

What is the maximum number of containers that can be run simultaneously in an Azure Container Instances (ACI) group?

  • a) 10
  • b) 60
  • c) 100
  • d) There is no limit.

Answer: b)

Explanation: As of June 2021, the maximum number of containers in a container group is

Azure Container Instances requires virtual network support. True or False?

  • True
  • False

Answer: False.

Explanation: Azure Container Instances does not require virtual network support but it is optional, you can deploy your containers into an Azure virtual network.

Which of the following is not a valid restart policy for Azure Container Instances?

  • a) Always
  • b) OnFailure
  • c) Never
  • d) Sometimes

Answer: d) Sometimes.

Explanation: ‘Sometimes’ is not a valid restart policy in Azure Container Instances. The valid policies are: Always, OnFailure, and Never.

True or False: Azure Container Instances can interact with other Azure resources such as Azure Logic Apps, Azure Functions, and Event Grid.

  • True
  • False

Answer: True.

Explanation: Azure Container Instances can integrate with other Azure services making it a versatile part of any Azure solution.

Azure Container Instances can run Windows and Linux containers simultaneously. True or False?

  • True
  • False

Answer: False.

Explanation: Container Instances can run either Windows or Linux containers, but not both at the same time.

Which of these can be used for persistent storage options in Azure Container Instances? Select all that apply.

  • a) Azure Files volumes
  • b) Git repositories
  • c) EmptyDir volumes
  • d) Azure Blobs

Answer: a) Azure Files volumes, c) EmptyDir volumes.

Explanation: For persistent storage, Azure Container Instances offers Azure Files volumes and EmptyDir volumes. Git repositories and Azure Blobs are not used for storage in Container Instances.

Interview Questions

What is Azure Container Instances?

Azure Container Instances (ACI) is a service offered by Microsoft Azure to run Docker containers. It is a PaaS (Platform as a Service) that allows applications to be run on-demand in a managed container without the need for any underlying infrastructure management.

What is a container group in Azure Container Instances?

A container group 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.

How do you specify a container group in Azure?

A container group is specified in Azure using the YAML file that includes the definitions of the containers that make up the group. This file includes properties like the name, image, resources, ports, and volume mounts for each container.

What is resource allocation in Azure Container Instances and how can it be configured?

Resource allocation in Azure Container Instances refers to specifying the amount of CPU and memory resources that a container requires. This can be configured in the YAML file when defining a container.

What is the purpose and function of Volumes in Azure Container Instances?

Volumes in Azure Container Instances provide persistent storage that can be accessed by the containers in a container group. They are used to store data that needs to be preserved beyond the lifecycle of a single container.

How do you specify network information for a container group in Azure Container Instances?

Network information for a container group in Azure Container Instances can be specified in the YAML file used to define the container group. This includes properties such as ports and DNS label name.

What are environment variables in Azure Container Instances and how are they used?

Environment variables in Azure Container Instances are used to configure the containers in a container group. These variables can be used to provide configuration settings that the containerized application can use when it is running.

How do you delete a container group in Azure Container Instances?

You can delete a container group in Azure Container Instances using the Azure CLI with the command ‘az container delete’, followed by the –name and –resource-group flags to specify the container group to delete.

Can you restrict inbound network access to a container group in Azure Container Instances?

Yes, you can restrict inbound network access to a container group in Azure Container Instances by using network profiles and applying Azure network policies.

What is a multi-region container group in Azure Container Instances and how can it be configured?

A multi-region container group in Azure Container Instances allows you to run the same application across multiple regions to increase availability and reliability. It can be configured by providing multiple DNS name labels and corresponding locations while creating the container group.

Can you run Windows containers in Azure Container Instances?

Yes, Azure Container Instances supports both Windows and Linux containers.

Can you use private Docker registry images with Azure Container Instances?

Yes, Azure Container Instances can pull images from DockerHub, Azure Container Registry, and other private registries.

How are updates applied to running containers in Azure Container Instances?

To update a running container in Azure Container Instances, the existing container group must be deleted and a new container group with the updated image needs to be created.

Can you use Azure Monitor with Azure Container Instances?

Yes, you can use Azure Monitor with Azure Container Instances to collect and analyze diagnostic logs and metrics from your containers.

How do monitor application logs in Azure Container Instances.

Application logs in Azure Container Instances can be monitored through the use of the ‘az container logs’ command in Azure CLI.

Leave a Reply

Your email address will not be published. Required fields are marked *