Ensure the --audit-log-maxsize argument is set to 100 or as appropriate

Error: The --audit-log-maxsize argument is not set appropriately

Bridgecrew Policy ID: BC_K8S_70
Checkov Check ID: CKV_K8S_94
Severity: LOW

The --audit-log-maxsize argument is not set appropriately


Rotate log files on reaching 100 MB or as appropriate. Kubernetes automatically rotates the log files. Retaining old log files ensures that you would have sufficient log data available for carrying out any investigation or correlation. If you have set file size of 100 MB and the number of old log files to keep as 10, you would approximate have 1 GB of log data that you could potentially use for your analysis.

Fix - Buildtime


  • Kind: Pod
apiVersion: v1
kind: Pod
  creationTimestamp: null
    component: kube-apiserver
    tier: control-plane
  name: kube-apiserver
  namespace: kube-system
  - command:
+   - kube-apiserver
+   - --audit-log-maxsize=150
    image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0