Member-only story
Using Azure Monitor Logs with Azure Kubernetes Service (AKS)

Terminology Clarifications
Getting on terms with all the different platform logging options on Azure can be a confusing endeavor. LogAnalytics! OMS! Application Insights! Azure Monitor! Azure Monitor Logs! The thing is, there is a lot of history on Azure, and logging itself has gone through several iterations as well. An overview can be found here: Azure Monitor naming and terminology changes. State now (April 2019) is that:
- OMS is obsolete (although the log collector that will be installed on the AKS cluster is still called OMS Agent)
- Application Insights is a separate logging solution for direct web application instrumentation (similar to Sentry)
- Azure Monitor is the new branding for general operations suite on Azure (logging / metrics / alerting etc.)
- Azure Monitor Logs are still stored inside a “LogAnalytics Workspace” (Azure Resource), but presumably this will be changed in the future as well.
Azure Monitor Logs setup
Having the terminology out of the way, setting up the Azure Monitor Logs for an AKS cluster is actually very easy.
First, you need a Log Analytics Workspace. You can create one either through the Azure Portal, or using a combination of ARM templates and Azure CLI. Afterwards, you need to find out its resource ID:
The Resource ID will be all that is required for cluster configuration. Enabling Azure Monitor Logs on an existing cluster is as simple as:
Side note: Same parameters can be specified for az aks create.
To verify the setup: