More Info:
Retain the logs for at least 30 days or as appropriate.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, open the kube-apiserver static pod manifest for editing:
-
In the container
commandsection, either add or update the--audit-log-maxageflag to use at least 30 days, for example:Ensure it is listed as a separate-item alongside the other--flags. - Save and close the file. The kube-apiserver static pod will be automatically restarted by the kubelet when the manifest changes. Expect a brief control plane disruption while it restarts.
-
Wait for the kube-apiserver pod to come back to a Running state:
-
Verify that the new process is running with the correct
--audit-log-maxagesetting on each control plane node:
Using kubectl
Using kubectl
kubectl cannot modify the API server’s host-level static pod manifest or its process flags, so this finding cannot be fixed via kubectl. To remediate, you must edit
/etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node to set --audit-log-maxage=30 (or your chosen value); see the Manual Steps section for details.Automation
Automation

