File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
content/zh/docs/tasks/debug-application-cluster Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ to the location of the policy file and log file, so that audit records are persi
267
267
268
268
` ` ` shell
269
269
--audit-policy-file=/etc/kubernetes/audit-policy.yaml
270
- --audit-log-path=/var/log/audit.log
270
+ --audit-log-path=/var/log/kubernetes/audit/ audit.log
271
271
` ` `
272
272
273
273
接下来挂载数据卷:
@@ -277,7 +277,7 @@ volumeMounts:
277
277
- mountPath: /etc/kubernetes/audit-policy.yaml
278
278
name: audit
279
279
readOnly: true
280
- - mountPath: /var/log/audit.log
280
+ - mountPath: /var/log/kubernetes/ audit/
281
281
name: audit-log
282
282
readOnly: false
283
283
` ` `
@@ -288,15 +288,17 @@ and finally configure the `hostPath`:
288
288
最后配置 `hostPath`:
289
289
290
290
` ` ` yaml
291
+ ...
292
+ volumes:
291
293
- name: audit
292
294
hostPath:
293
295
path: /etc/kubernetes/audit-policy.yaml
294
296
type: File
295
297
296
298
- name: audit-log
297
299
hostPath:
298
- path: /var/log/audit.log
299
- type: FileOrCreate
300
+ path: /var/log/kubernetes/ audit/
301
+ type: DirectoryOrCreate
300
302
` ` `
301
303
302
304
<!--
You can’t perform that action at this time.
0 commit comments