A few days ago Microsoft announced the GA (general availability) of Azure Container Instances. Being the only production-ready serverless container solution among the major players is a great achievement.
The excellent documentation and at a lot of great blog posts on Azure Container Instances already exists. But they mainly focus on how to use the Azure cross-platform command line interface to work with Azure Container instances.
In this blog post, I will share three tips on how to work with Azure Container Instances from the Azure Portal. Even though the Azure Portal experience for Azure Container Instances is limited compared to the command line tools, the portal still offers some practical features that are not as easily achieved by the command line.
Having live metrics of the general health of your containers is vital. For docker containers, other methods exist for collecting metrics. But sometimes it is just convenient to have basic metrics delivered directly from the Azure Portal. This can be done with the ‘Metrics‘ tab in the Azure Portal.
Inhere you can get metrics on ‘CPU Usage‘ and ‘Memory Usage‘. You can create several graphs and style them individually. If you have provisioned multiple containers in Azure Container Instances, you can split the metrics by container name.
The ‘Metrics’ feature is still in preview so we might expect things to change.
Logs and events from containers are crucial parts of day-to-day operations as well as debugging scenarios. The Azure Portal supports viewing container platform events as well as container logs (and individual container properties) in the ‘Containers‘ tab.
If you have deployed a multi-container group to Azure Container Instances, you can select each container in the ‘Container‘ list at the top to see its events and logs.
The container and event logs are not live. You need to click the ‘Refresh’ button to see latest updates.
It is currently not possible to see combined container logs like you can with docker-compose.
Azure Resource Manager (ARM) templates are the ‘backbone’ deployment format for Azure and are indeed not something that is exclusive to Azure Container Instances.
Nevertheless, it is handy to view, edit and redeploy Azure Container Instances via Resource Manager Templates. Mainly because lots of container solutions are stateless and hence it is better to redeploy rather than moving an Azure Container Instance.
To view deployments in the Azure Portal go to the resource group containing you Azure Container Instances and then click the ‘Deployments‘ tab.
Then click the ‘deployment’ and then click the ‘Template‘ tab to view the template that was used to deploy your container instance. The template shown below is the one used when deploying Azure Container Instances via the Azure Portal.
You can then click the ‘Deploy‘ button at the top to deploy your container to another resource group or subscription. You will be able to reuse some of the input from the original deployment (image name, registry information, etc.).
Do you have some great tips for using Azure Container Instances in the Azure Portal? Please share your thoughts in the comments below.
Do you want to get the latest news and blog post directly in your inbox? Click here to subscribe to my newsletter!
Interested in containers? Check out my other blog posts about containers.9