Skip to content

Instantly share code, notes, and snippets.

@ams0
Created January 10, 2021 03:18
Show Gist options
  • Save ams0/ef09c99bb6261070888b29e9cd29e4ba to your computer and use it in GitHub Desktop.
Save ams0/ef09c99bb6261070888b29e9cd29e4ba to your computer and use it in GitHub Desktop.
...
spec:
containers:
- command:
- kube-apiserver
- --audit-policy-file=/etc/kubernetes/audit-policy.yaml
- --audit-log-path=/var/log/audit.log
- --audit-log-maxsize=10
- --audit-log-maxbackup=7
...
volumeMounts:
- mountPath: /etc/kubernetes/audit-policy.yaml
name: audit
readOnly: true
- mountPath: /var/log/audit.log
name: audit-log
readOnly: false
...
volumes:
- name: audit
hostPath:
path: /etc/kubernetes/audit-policy.yaml
type: File
- name: audit-log
hostPath:
path: /var/log/audit.log
type: FileOrCreate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment