Skip to content

Commit e2ceb1f

Browse files
authored
Merge pull request #31098 from shuaijinchao/zh/sync/debug-application-cluster/audit
[zh] synchronize translate audit.md
2 parents 8306901 + 51339b4 commit e2ceb1f

File tree

1 file changed

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

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ to the location of the policy file and log file, so that audit records are persi
267267

268268
```shell
269269
--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
271271
```
272272

273273
接下来挂载数据卷:
@@ -277,7 +277,7 @@ volumeMounts:
277277
- mountPath: /etc/kubernetes/audit-policy.yaml
278278
name: audit
279279
readOnly: true
280-
- mountPath: /var/log/audit.log
280+
- mountPath: /var/log/kubernetes/audit/
281281
name: audit-log
282282
readOnly: false
283283
```
@@ -288,15 +288,17 @@ and finally configure the `hostPath`:
288288
最后配置 `hostPath`:
289289

290290
```yaml
291+
...
292+
volumes:
291293
- name: audit
292294
hostPath:
293295
path: /etc/kubernetes/audit-policy.yaml
294296
type: File
295297
296298
- name: audit-log
297299
hostPath:
298-
path: /var/log/audit.log
299-
type: FileOrCreate
300+
path: /var/log/kubernetes/audit/
301+
type: DirectoryOrCreate
300302
```
301303

302304
<!--

0 commit comments

Comments
 (0)