Skip to main content

More Info:

Audit logs record all requests made to the Kubernetes master components in the AKS cluster. Enabling collection of kube-audit and kube-audit-admin logs via Azure Diagnostic settings provides an authoritative record of activity for security investigations and compliance.

Risk Level

High

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. Identify the AKS cluster and its resource group
    • On any machine with Azure CLI access:
    • Note the name of the cluster and its resourceGroup (for example, myAKSCluster and myResourceGroup). Do not use the MC_... node resource group.
  2. List existing diagnostic settings on the AKS resource
    • On any machine with Azure CLI access:
    • Review the output to see if there is a diagnostic setting that sends logs to a Log Analytics workspace and includes kube-audit and kube-audit-admin in logs[].category.
  3. Confirm Log Analytics workspace details (if present)
    • If a diagnostic setting already sends logs to a workspace, get the workspace info:
    • Verify that logs[].category includes kube-audit and kube-audit-admin and that workspaceId is populated.
  4. Decision: adjust an existing diagnostic setting or plan a new one
    • If an existing diagnostic setting targets a Log Analytics workspace but is missing kube-audit or kube-audit-admin, plan to modify it in the Azure portal (as per the benchmark steps) to add these categories.
    • If no diagnostic setting sends logs to Log Analytics, plan to create one in the Azure portal on the AKS cluster resource, choosing or creating an appropriate Log Analytics workspace and enabling kube-audit and kube-audit-admin.
  5. Implement changes in Azure portal (manual UI action)
    • In a browser, open the Azure portal and navigate to the AKS cluster’s resource group (not the MC_... group).
    • Use Diagnostic settings on the AKS cluster resource to either:
      • Edit an existing diagnostic setting to ensure Send to Log Analytics is enabled and both kube-audit and kube-audit-admin logs are selected, or
      • Add a new diagnostic setting configured as above, following the benchmark remediation steps exactly.
  6. Verify that kube-audit logs are enabled
    • After saving the diagnostic setting, re-run on any machine with Azure CLI:
    • Confirm in the JSON output that at least one diagnostic setting for the AKS cluster has logs[].category including both kube-audit and kube-audit-admin, and that it is configured to send data to a Log Analytics workspace.
kubectl cannot enable or configure AKS control‑plane audit logs, because this setting is managed at the Azure resource/diagnostic level, not via Kubernetes API objects. To remediate this finding, use the Azure portal/CLI or your IaC to configure Diagnostic settings for the AKS cluster as described in the Manual Steps section.