More Info:
Enable auditing on the Kubernetes API Server and set the desired audit log path.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, open the API server static pod manifest for editing:
-
In the container command/args section for
kube-apiserver, add or update the audit log path argument so it is present as its own list item, for example:Ensure it is aligned with the other- --arguments under the same list. -
Still on the same node, make sure the target directory exists and has appropriate permissions:
-
Save the file and exit the editor. The kubelet will automatically detect the change to
/etc/kubernetes/manifests/kube-apiserver.yamland restart the API server static pod; expect a brief control-plane disruption during the restart. -
After 1–2 minutes, verify that the API server process now includes the
--audit-log-pathargument on every control plane node:Confirm the output shows a segment similar to:
--audit-log-path=/var/log/apiserver/audit.log
Using kubectl
Using kubectl
kubectl cannot configure API server process flags or edit the static pod manifest on disk, so it cannot be used to set --audit-log-path. This must be fixed directly on each control plane node by editing /etc/kubernetes/manifests/kube-apiserver.yaml; see the Manual Steps section for the exact procedure.Automation
Automation

