Azure Monitor is Microsoft’s native solution for collecting and analyzing metrics and logs from applications, infrastructure, and Azure services. With Container Insights for Azure Kubernetes Service (AKS), you gain end-to-end visibility into your containerized workloads—helping you troubleshoot performance issues, improve availability, and optimize resource utilization.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.

- Real-time metrics and logs
- Interactive dashboards and workbooks
- Alerting and diagnostic capabilities
What Is Container Insights?
Container Insights is an Azure Monitor feature built specifically for AKS clusters. It collects performance and health data across your nodes and containers, allowing you to:- Detect resource hotspots
- Trace application failures
- Set up proactive alerts
| Data Type | Description | Examples |
|---|---|---|
| Metrics | Numerical values over time | CPU usage, memory consumption, network I/O |
| Logs | Structured or unstructured event records | Container logs, system events, application traces |

Azure Monitoring Agent Architecture
Enabling the monitoring add-on on AKS deploys two Azure Monitoring Agents (AMA):| Agent Type | Deployment Method | Role |
|---|---|---|
| AMA ReplicaSet | ReplicaSet (1 pod) | Cluster-level failover for metrics |
| AMA DaemonSet | DaemonSet (all nodes) | Node-level metrics & log collection |
Demo: Create an AKS Cluster with Container Insights
Follow these steps in the Azure portal to spin up an AKS cluster with Container Insights:- Navigate to Create Kubernetes cluster.
- Under the Integration tab, enable Container Insights.
- (Optional) Enable Managed Prometheus and Managed Grafana.
- For this demo, toggle Alerting Off.
- Review and Create.

Exploring Cluster Metrics
The Container Insights dashboard provides a high-level overview of your AKS environment:- Total node count
- CPU and memory utilization over time
- Active pod count

Generating Load with a Stress Test
To observe real-time metric changes, create CPU load in a test namespace:test-shell pod:
Viewing Node and Container Details
Within Container Insights:- Nodes tab: Displays per-node CPU/memory metrics. The stressed node will be easily identifiable.
- Containers tab: Lists every container and its performance metrics.
test-shell to view its live status, console output, and event timeline:
Cost Considerations
Azure Monitor charges based on the volume of data ingested into Log Analytics. Enabling Managed Prometheus increases ingestion volume, and Azure Managed Grafana incurs additional per-user costs.Review your ingestion rates and retention settings in your Log Analytics workspace to optimize costs.
Integrating Prometheus and Grafana
Azure Monitor for Containers can natively scrape Prometheus endpoints—no self-hosted server needed. Expose your metrics endpoint to AMA, and configure PromQL alerts.| Component | Purpose |
|---|---|
| Prometheus | Pull-based metric collection and querying (PromQL) |
| Grafana | Dashboarding and multi-source alerting |

- Open the Grafana resource in the Azure portal.
- Copy the Instance URL and sign in with Azure AD.
- Browse pre-built Azure dashboards under Dashboards.
