Skip to content

Commit

Permalink
Merge pull request #30712 from funkypenguin/issue30661
Browse files Browse the repository at this point in the history
Fix auditing example to permit log rotation
  • Loading branch information
k8s-ci-robot authored Dec 6, 2021
2 parents b904695 + 4f96e39 commit d6865d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/en/docs/tasks/debug-application-cluster/audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ If your cluster's control plane runs the kube-apiserver as a Pod, remember to mo
to the location of the policy file and log file, so that audit records are persisted. For example:
```shell
--audit-policy-file=/etc/kubernetes/audit-policy.yaml \
--audit-log-path=/var/log/audit.log
--audit-log-path=/var/log/kubernetes/audit/audit.log
```
then mount the volumes:

Expand All @@ -157,7 +157,7 @@ volumeMounts:
- mountPath: /etc/kubernetes/audit-policy.yaml
name: audit
readOnly: true
- mountPath: /var/log/audit.log
- mountPath: /var/log/kubernetes/audit/
name: audit-log
readOnly: false
```
Expand All @@ -172,8 +172,8 @@ and finally configure the `hostPath`:
- name: audit-log
hostPath:
path: /var/log/audit.log
type: FileOrCreate
path: /var/log/kubernetes/audit/
type: DirectoryOrCreate
```

Expand Down

0 comments on commit d6865d1

Please sign in to comment.