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
HighAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify the AKS cluster and its resource group
- On any machine with Azure CLI access:
- Note the
nameof the cluster and itsresourceGroup(for example,myAKSClusterandmyResourceGroup). Do not use theMC_...node resource group.
- On any machine with Azure CLI access:
-
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-auditandkube-audit-admininlogs[].category.
- On any machine with Azure CLI access:
-
Confirm Log Analytics workspace details (if present)
- If a diagnostic setting already sends logs to a workspace, get the workspace info:
- Verify that
logs[].categoryincludeskube-auditandkube-audit-adminand thatworkspaceIdis populated.
- If a diagnostic setting already sends logs to a workspace, get the workspace info:
-
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-auditorkube-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-auditandkube-audit-admin.
- If an existing diagnostic setting targets a Log Analytics workspace but is missing
-
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 Analyticsis enabled and bothkube-auditandkube-audit-adminlogs are selected, or - Add a new diagnostic setting configured as above, following the benchmark remediation steps exactly.
- Edit an existing diagnostic setting to ensure
- In a browser, open the Azure portal and navigate to the AKS cluster’s resource group (not the
-
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[].categoryincluding bothkube-auditandkube-audit-admin, and that it is configured to send data to a Log Analytics workspace.
- After saving the diagnostic setting, re-run on any machine with Azure CLI:
Using kubectl
Using kubectl
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.
Automation
Automation

