This article describes how Azure Kubernetes Service (AKS) monitoring compares to Amazon Elastic Kubernetes Service (Amazon EKS). The article guides you on different options to monitor and manage the logs of an AKS cluster and its workloads.
Note
This article is part of a series of articles that helps professionals who are familiar with Amazon EKS to understand Azure Kubernetes Service (AKS).
Amazon EKS monitoring and logging
Like any Kubernetes service, EKS has two major components, the control plane and worker nodes. There are specific capabilities for each layer.
Amazon EKS control plane and cluster monitoring
Amazon EKS integrates with Amazon CloudWatch Logs to provide logging and monitoring for the Amazon EKS control plane. This integration isn't enabled by default, but when configured, it gathers logs on:
- API server and API calls.
- Audit logs and user interactions.
- Authenticator logs.
- Scheduler and controller logs.
Amazon EKS exposes control plane metrics at the /metrics
endpoint, in Prometheus text format. CloudWatch Container Insights can collect and store Prometheus metrics. You can deploy and self-manage Prometheus on top of your EKS cluster, or use Amazon Managed service for Prometheus.
Amazon EKS also integrates with Amazon Web Services (AWS) CloudTrail to track actions and API calls. For more information, see Logging Amazon EKS API calls with AWS CloudTrail.
Amazon EKS workload monitoring
CloudWatch Container Insights can collect and aggregate metrics and logs from containerized applications deployed in EKS. You can implement Container Insights on Amazon EKS with a containerized version of the CloudWatch agent, or by using the AWS Distro for OpenTelemetry as a DaemonSet. You can send logs with FluentBit.
AKS monitoring and logging
Like other Azure resources, AKS generates platform metrics and resource logs that you can use to monitor its basic health and performance.
Download a Visio file of this architecture.
Azure Monitor
AKS natively integrates with Azure Monitor. Azure Monitor stores metrics and logs in a central location called a Log Analytics workspace. This data is processed and analyzed to provide insights and alerts. For more information, see Monitor Azure Kubernetes Service (AKS) with Azure Monitor.
Container Insights is the feature of Azure Monitor that collects, indexes, and stores the data your AKS cluster generates. You can configure Container Insights to monitor managed Kubernetes clusters hosted on AKS and other cluster configurations. Container Insights can monitor AKS health and performance with visualization tailored to Kubernetes environments. Similar to EKS, enabling Container Insights for your AKS cluster deploys a containerized version of the Log Analytics agent, which is responsible for sending data to your Log Analytics workspace.
Microsoft Sentinel
Microsoft Sentinel delivers intelligent security analytics and threat intelligence across the enterprise. With Microsoft Sentinel, you get a single solution for attack detection, threat visibility, proactive hunting, and threat response.
Microsoft Sentinel must be connected with your AKS. This connector lets you stream your Azure Kubernetes Service (AKS) diagnostics logs into Microsoft Sentinel, allowing you to continuously monitor activity in all your instances.
Once you have connected your data sources to Microsoft Sentinel, you can visualize and monitor the data using the Microsoft Sentinel and Azure Monitor Workbooks, which provides versatility in creating custom dashboards.
AKS cluster and workload monitoring
An AKS deployment can divide into cluster level components, managed AKS components, Kubernetes objects and workloads, applications, and external resources. The following table shows a common strategy for monitoring an AKS cluster and workload applications. Each level has distinct monitoring requirements.
Level | Description | Monitoring requirements |
---|---|---|
Cluster level components | Virtual machine scale sets abstracted as AKS nodes and node pools | Node status and resource utilization including CPU, memory, disk, and network |
Managed AKS components | AKS control plane components including API servers, cloud controller, and kubelet |
Control plane logs and metrics from the kube-system namespace |
Kubernetes objects and workloads | Kubernetes objects such as deployments, containers, and replica sets | Resource utilization and failures |
Applications | Application workloads running on the AKS cluster | Monitoring specific to architecture, but including application logs and service transactions |
External | External resources that aren't part of AKS but are required for cluster scalability and management | Specific to each component |
Cluster level components: You can use existing Container Insights views and reports to monitor cluster level components to understand their health, readiness, performance, CPU and memory resource utilization, and trends.
Managed AKS components: You can use Metrics Explorer to view the Inflight Requests counter. This view includes request latency and work queue processing time.
Kubernetes objects and workloads: You can use existing Container Insights views and reports to monitor deployment, controllers, pods, and containers. Use the Nodes and Controllers views to view the health and performance of the pods that are running on nodes and controllers, and their resource consumption in terms of CPU and memory.
From the Container Insights Containers view, you can view the health and performance of containers, or select an individual container and monitor its events and logs in real time. For details about using this view and analyzing container health and performance, see Monitor your Kubernetes cluster performance with Container Insights.
Applications: You can use Application Insights to monitor applications that are running on AKS and other environments. Application Insights is an application performance management tool that provides support for many programming languages. Depending on your needs, you can instrument your application code to capture requests, traces, logs, exceptions, custom metrics, and end-to-end transactions, and send this data to Application Insights. If you have a Java application, you can provide monitoring without instrumenting your code. For more information, see Zero instrumentation application monitoring for Kubernetes.
External components: You can use Azure Monitor features to monitor any Azure platform-as-a-service (PaaS) that your workload applications use, such as databases and other Azure resources.
Azure Monitor managed service for Prometheus
Prometheus is a popular open-source metrics monitoring solution from Cloud Native Compute Foundation and the most common tool used for collecting and analyzing metric data from Kubernetes clusters. Azure Monitor managed service for Prometheus is a fully managed Prometheus-compatible monitoring solution in Azure which stores its data in an Azure Monitor workspace, which is linked to a Grafana workspace so that you can analyze the data with Azure Managed Grafana.
Prometheus can also be deployed independently as a self-managed solution within Azure Kubernetes Service clusters. You can integrate self-hosted Prometheus with Azure Monitor. Container Insights can be configured to collect Prometheus metrics. You can expose the Prometheus metrics endpoint through your exporters or pod applications, and the containerized agent for Container Insights will scrape the metrics.
Azure Managed Grafana
Azure Managed Grafana is a data visualization platform built on top of the Grafana. It's built as a fully managed Azure service operated and supported by Microsoft. Multiple predefined Grafana dashboards are available for monitoring Kubernetes and full-stack troubleshooting.
Azure Managed Grafana is optimized for the Azure environment and works with many Azure services and provides simple integration features. Alternatively, you can also deploy Grafana independently as a self-managed solution. For more information, see Monitor your Azure services in Grafana.
AKS monitoring costs
The Azure Monitor pricing model is primarily based on the amount of data that's ingested per day into your Log Analytics workspace. The cost varies by the plan and retention periods you select.
Before enabling Container Insights, estimate costs and understand how to control data ingestion and its costs. For detailed guidance, see Estimating costs to monitor your AKS cluster.
Contributors
This article is maintained by Microsoft. It was originally written by the following contributors.
Principal authors:
- Ketan Chawda | Senior Customer Engineer
- Paolo Salvatori | Principal Service Engineer
- Laura Nicolas | Senior Software Engineer
Other contributors:
- Chad Kittel | Principal Software Engineer
- Ed Price | Senior Content Program Manager
- Theano Petersen | Technical Writer
To see non-public LinkedIn profiles, sign in to LinkedIn.
Next steps
- AKS for Amazon EKS professionals
- Kubernetes identity and access management
- Secure network access to Kubernetes
- Storage options for a Kubernetes cluster
- Cost management for Kubernetes
- Kubernetes node and node pool management
- Cluster governance
Related resources
- Use Azure Monitor Private Link Scope
- Monitor Azure Kubernetes Service (AKS) with Azure Monitor
- Monitoring AKS data reference
- Container Insights overview
- Enable Container Insights
- AKS resource logs
- Configure scraping of Prometheus metrics with Container Insights
- How to query logs from Container Insights
- Azure Monitor data source for Grafana
- Monitor and back up Azure resources
- Instrument solutions to support monitoring and logging
- Design a solution to log and monitor Azure resources
- Monitor the usage, performance, and availability of resources with Azure Monitor