AZ-400 Question 278
Select 2You are responsible for monitoring containerized applications running on an Azure Kubernetes Service (AKS) cluster in a DevOps environment. The applications need to capture both standard metrics (CPU/Memory usage) and custom application traces for troubleshooting. Which two actions should you take to gather and centralize logs and metrics for end-to-end monitoring?
- A
Configure Azure Monitor Container Insights for your AKS cluster and specify a Log Analytics workspace to store metrics and logs
- B
Enable diagnostic logs at the cluster level solely through the Kubernetes built-in metrics server
- C
Rely on Kubernetes events exclusively to gather all application tracing data
- D
Deploy the Azure Monitor for containers Helm chart to your AKS cluster to automatically collect performance data and logs
Show answer and explanation
Correct answers: A, D
Explanation
In a DevOps environment, you typically need comprehensive metrics, logs, and traces to effectively monitor containerized workloads. Azure Monitor Container Insights (configured via Azure Portal, CLI, or the Helm chart) is a proven way to capture metrics from AKS nodes and containers, as well as aggregate data in a Log Analytics workspace for centralized analysis. Refer to Azure documentation on 'Container Insights for Azure Kubernetes Service (AKS)' for guidance on setup and best practices.
- A. Correct.
Option 1 is correct. Using Azure Monitor Container Insights integrated with a Log Analytics workspace is a recommended approach for gathering performance metrics, logs, and container-level data from AKS clusters. Container Insights automatically collects CPU, memory, pod, and node metrics and sends them to Log Analytics for centralized analysis.
- B. Incorrect.
Option 2 is incorrect. While you can enable certain diagnostic logs through Kubernetes and the cluster itself, relying only on the built-in Kubernetes metrics server does not provide comprehensive logging or detailed application tracing. You need additional services for full monitoring coverage.
- C. Incorrect.
Option 3 is incorrect. Kubernetes events are useful for cluster-level events (e.g., pods starting or failing) but are insufficient as the sole source of application-level tracing data. Detailed logs and custom metrics would not be fully captured by events alone.
- D. Correct.
Option 4 is correct. Deploying the Azure Monitor for containers Helm chart or using the Azure Monitor extension is another valid method for capturing container performance data and logs in AKS. It sets up resources needed to send telemetry to a Log Analytics workspace or Azure Monitor.