Skip to content

Commit d6865d1

Browse files
authored
Merge pull request #30712 from funkypenguin/issue30661
Fix auditing example to permit log rotation
2 parents b904695 + 4f96e39 commit d6865d1

File tree

1 file changed

+4
-4
lines changed
  • content/en/docs/tasks/debug-application-cluster

1 file changed

+4
-4
lines changed

content/en/docs/tasks/debug-application-cluster/audit.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ If your cluster's control plane runs the kube-apiserver as a Pod, remember to mo
147147
to the location of the policy file and log file, so that audit records are persisted. For example:
148148
```shell
149149
--audit-policy-file=/etc/kubernetes/audit-policy.yaml \
150-
--audit-log-path=/var/log/audit.log
150+
--audit-log-path=/var/log/kubernetes/audit/audit.log
151151
```
152152
then mount the volumes:
153153

@@ -157,7 +157,7 @@ volumeMounts:
157157
- mountPath: /etc/kubernetes/audit-policy.yaml
158158
name: audit
159159
readOnly: true
160-
- mountPath: /var/log/audit.log
160+
- mountPath: /var/log/kubernetes/audit/
161161
name: audit-log
162162
readOnly: false
163163
```
@@ -172,8 +172,8 @@ and finally configure the `hostPath`:
172172
173173
- name: audit-log
174174
hostPath:
175-
path: /var/log/audit.log
176-
type: FileOrCreate
175+
path: /var/log/kubernetes/audit/
176+
type: DirectoryOrCreate
177177
178178
```
179179

0 commit comments

Comments
 (0)