Azure monitor is not collecting AKS audit logs?

Tanul 1,251 Reputation points


I need to know which user has created the pod in the AKS but there is no audit log available in Azure monitor. We are pushing all the logs in log analytics workspace but, never connected storage account.

I ran these simple queries but no results. Can anyone suggest the query for auditing the user

AzureDiagnostics | where Category == "kube-apiserver"

| where ResourceType == "MANAGEDCLUSTERS"

| summarize count() by CategoryUser's image

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,014 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,986 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andrei Barbu 2,581 Reputation points Microsoft Employee

    Hello Tanul,

    In one of the above queries, you check the "kube-apiserver" category. You should look in the the "kube-audit" category.

    | where Category == "kube-audit"

    Here are all the categories explained:

    From here, you should further filter based on the time and pod name to find details, including who created it.

    Hopefully this is what you are looking for! If you have additional questions, please let us know in the comments.

    If this has been helpful, please take a moment to accept answers as this helps increase visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A!