More Info:
Rotate log files on reaching 100 MB or as appropriate.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every control plane node, back up the existing manifest before editing:
- Edit the API server manifest to set the audit log max size (example: 100 MB):
--audit-log-maxsize is not present, add a new line under the command/- kube-apiserver args block, for example:-
Wait for the kubelet on the control plane node to detect the changed static pod manifest and restart the
kube-apiserverpod automatically. This restart is expected and will temporarily affect the API server on that node. -
Verify on the same control plane node that the
kube-apiserverprocess is running with the desired--audit-log-maxsizevalue (replace100below if you chose a different value):
Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, so this finding cannot be fixed via the Kubernetes API. To change
--audit-log-maxsize, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; follow the steps in the Manual Steps section.Automation
Automation

