In Chapter 6 of Monitoring and Troubleshooting AKS (Azure Kubernetes Service), we delve into setting up Azure Monitor, leveraging Azure Log Analytics, diagnosing issues, and managing resource utilization. Proactive strategies like alerts and cost management will also be covered. Below are 30 multiple-choice questions (MCQs) based on the key concepts.
Setting up Azure Monitor for AKS
Which of the following tools can be used to set up Azure Monitor for AKS?
A) Azure CLI
B) Azure Portal
C) PowerShell
D) All of the above
What is the first step in setting up Azure Monitor for AKS?
A) Configure monitoring policies
B) Deploy the AKS cluster
C) Enable diagnostic settings for AKS
D) Set up alerts
Azure Monitor for AKS provides insights into which of the following metrics?
A) CPU utilization
B) Memory utilization
C) Network traffic
D) All of the above
Which service does Azure Monitor use to collect and analyze logs for AKS?
A) Azure Storage
B) Azure Log Analytics
C) Azure Event Grid
D) Azure Service Bus
Which resource in Azure Monitor helps visualize AKS performance metrics and logs?
A) Azure Dashboards
B) Azure Sentinel
C) Azure App Insights
D) Azure Automation
What should you enable on your AKS cluster to send log data to Azure Monitor?
A) Log Analytics workspace
B) Diagnostic settings
C) Kubernetes Monitoring Solution
D) All of the above
How often does Azure Monitor collect AKS data by default?
A) Every minute
B) Every 5 minutes
C) Every 30 seconds
D) Every 10 minutes
Using Azure Log Analytics for diagnostics and monitoring
Which of the following is used to query log data in Azure Log Analytics?
A) Kusto Query Language (KQL)
B) SQL
C) PowerShell
D) Bash
What kind of data can be stored in Azure Log Analytics for AKS monitoring?
A) Performance metrics
B) Audit logs
C) Container logs
D) All of the above
To troubleshoot a failing AKS service, you would typically start by analyzing which of the following logs in Log Analytics?
A) Cluster Metrics
B) Container Logs
C) Node Logs
D) All of the above
Which of the following can you do with Azure Log Analytics data related to AKS?
A) Create custom dashboards
B) Set up alerts
C) Perform queries
D) All of the above
In Azure Log Analytics, which feature allows you to create automated responses based on query results?
A) Log Alerts
B) KQL Scripts
C) Action Groups
D) Automation Runbooks
What is the purpose of the Azure Log Analytics workspace?
A) Store diagnostics data
B) Aggregate logs from multiple services
C) Provide a query interface for logs
D) All of the above
Which of the following actions is NOT possible with Azure Log Analytics in AKS?
A) Real-time alert generation
B) Historical log analysis
C) Deployment of new containers
D) Custom report creation
Which of these Azure services integrates seamlessly with Azure Log Analytics to enhance diagnostics?
A) Azure Application Insights
B) Azure Security Center
C) Azure Virtual Machines
D) All of the above
Troubleshooting common Kubernetes issues in AKS
When troubleshooting AKS pods that are stuck in a “Pending” state, which Kubernetes resource is most likely to be the issue?
A) Deployment
B) Node resource availability
C) Ingress controller
D) ReplicaSet
Which tool is used to check the logs of a pod in AKS?
A) kubectl logs
B) Azure CLI logs
C) Azure Monitor Logs
D) kubectl describe
If a pod is in a CrashLoopBackOff state, what should you investigate first?
A) Container image
B) Pod’s resource limits
C) Node status
D) All of the above
What Kubernetes command can be used to check the status of all resources in AKS?
A) kubectl get all
B) kubectl describe all
C) kubectl get pods
D) kubectl status
If an AKS node is unresponsive, what should be the first step in troubleshooting?
A) Restart the node
B) Check the node’s CPU usage
C) Review the node’s logs in Azure Monitor
D) Upgrade the Kubernetes version
Which of the following is a common reason why Kubernetes services in AKS do not resolve DNS?
A) Service misconfiguration
B) Pod resource limits
C) Network security group issues
D) All of the above
What is the most common issue when an AKS pod fails to pull an image?
A) Incorrect image tag
B) Insufficient node resources
C) Networking issues
D) Incorrect service account
What should you check when AKS pods are consuming more resources than expected?
A) Resource requests and limits
B) Pod affinity rules
C) Node taints and tolerations
D) All of the above
When an AKS application becomes unresponsive, which tool would you use to diagnose networking issues between pods?
A) kubectl get services
B) Azure Network Watcher
C) kubectl describe node
D) kubectl logs
Resource utilization and cost management
Which of the following is a key factor in managing resource utilization in AKS?
A) Setting resource requests and limits for containers
B) Using spot instances
C) Enabling autoscaling
D) All of the above
What feature of AKS helps automatically adjust resources based on demand?
A) Horizontal Pod Autoscaler
B) Virtual Machine Scale Sets
C) Kubernetes Vertical Pod Autoscaler
D) All of the above
How does Azure help track the cost of running AKS clusters?
A) Azure Cost Management
B) Azure Pricing Calculator
C) Azure Monitor
D) Azure Billing
What is the most cost-effective way to run workloads in AKS?
A) Using managed nodes
B) Scaling down during off-peak hours
C) Using spot instances
D) Using premium storage
Alerts and proactive monitoring strategies
Which of the following can trigger alerts in Azure Monitor for AKS?
A) Resource utilization exceeding thresholds
B) Node failures
C) Pod restarts
D) All of the above
Which of the following Azure services allows you to proactively manage alerts and automate responses for AKS?