More Info:
Verifies that the API server —audit-log-path argument is set so API activity is recorded. Without audit logging, security incidents cannot be investigated.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, back up the existing manifest so you can roll back if needed:
-
On every control plane node, create the audit log directory and set safe permissions:
-
On every control plane node, edit the API server static pod manifest:
In the
command:list forkube-apiserver, add (or modify) this flag so it appears as a separate list item:Save and exit. Editing this file will cause the kubelet to restart the kube-apiserver pod automatically. -
On every control plane node, wait for the API server pod to restart and become Running:
(If you use Docker instead of containerd, use
sudo docker ps | grep kube-apiserver.) -
On any machine with
kubectlaccess, confirm the API server is healthy:Ensure the output isok. -
On every control plane node, verify the process now includes the
--audit-log-pathflag:The command should return a line showing--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 at
/etc/kubernetes/manifests/kube-apiserver.yaml on control plane nodes. To set --audit-log-path as required, follow the host-level instructions in the Manual Steps section on every control plane node.Automation
Automation

