I was working on a customer project recently where we started to investigate Azure Container Apps which is a new service that is currently in preview from Microsoft. The feature provides developers with a way to deliver containerized applications without the complexity of Kubernetes in an Azure-based environment.
To summarize in a nutshell what Azure Container Apps is.
- It is built on Kubernetes (it is running AKS underneath)
- A Resource provider is built on top which abstracts away the Kubernetes API allowing developers to use ARM to deploy applications.
- Supports Kubernetes features like service discovery & traffic splitting.
This service also has built-in integration with Dapr, monitoring with Log Analytics (for Stdout events) and Load Balancer that is used for outgoing traffic egress and publishing applications internally or externally.
So, when setting up Container Apps, you need to have a Container App environment which is a Kubernetes Cluster (AKS) with a predefined Azure CNI network setup.
The service requires a large VNET with two subnets (1 for the control plane which will contain all the IPs for the worker nodes which is using Azure CNI) and (1 for applications.)
Now with container apps you do not get access to the Kubernetes API, hence deployment options are deploying with a docker image. When you have multiple containers deployed together, they will be grouped into a pod.
Regarding troubleshooting, the current setup is pretty limited. Log Analytics is configured by default and will log all stdout messages coming from the Container, but the app environment provides limited information yet.
For instance, after I deployed an application, I can view the logs within the Log Analytics workspace which is used for the Application Environment.
I can also do split traffic using the built-in envoy proxy. Either by having multiple revisions enabled at the same time,
or having multiple instances of the same application.
Deployment of applications can be done using the UI, CLI or even GitHub Actions. Not supported in Terraform yet, but it is being worked on Support for new Resource – Azure Container Apps · Issue #14122 · hashicorp/terraform-provider-azurerm (github.com)
Using the CLI you can also add application based upon YAML definition files.
az extension add --name containerapp --upgrade az containerapp create -n MyContainerapp -g MyResourceGroup \ --environment MyContainerappEnv \ --yaml "path/to/yaml/file.yml"
The YAML file specifications can be found here –> https://docs.microsoft.com/nb-no/azure/container-apps/azure-resource-manager-api-spec?tabs=yaml#container-app-examples. You can also use the CLI to connect to the console for a container as well as part of the latest release.
az containerapp exec -n <app-name> -g <resource-group>'
So if you want to have a serverless Kubernetes service without the hassle of running Kubernetes in production, this is the service for you! It provides many of the same features.
It is going to be interesting to see how this feature evolves, hopefully, in the future it can be able to provide the users of this service some more insight just to see the status and availability for each service in case something happens out of the box.