Merge pull request #31098 from shuaijinchao/zh/sync/debug-application-cluster/audit

[zh] synchronize translate audit.md
This commit is contained in:
Kubernetes Prow Robot
2021-12-25 17:25:14 -08:00
committed by GitHub
@@ -267,7 +267,7 @@ to the location of the policy file and log file, so that audit records are persi
```shell ```shell
--audit-policy-file=/etc/kubernetes/audit-policy.yaml --audit-policy-file=/etc/kubernetes/audit-policy.yaml
--audit-log-path=/var/log/audit.log --audit-log-path=/var/log/kubernetes/audit/audit.log
``` ```
接下来挂载数据卷: 接下来挂载数据卷:
@@ -277,7 +277,7 @@ volumeMounts:
- mountPath: /etc/kubernetes/audit-policy.yaml - mountPath: /etc/kubernetes/audit-policy.yaml
name: audit name: audit
readOnly: true readOnly: true
- mountPath: /var/log/audit.log - mountPath: /var/log/kubernetes/audit/
name: audit-log name: audit-log
readOnly: false readOnly: false
``` ```
@@ -288,6 +288,8 @@ and finally configure the `hostPath`:
最后配置 `hostPath` 最后配置 `hostPath`
```yaml ```yaml
...
volumes:
- name: audit - name: audit
hostPath: hostPath:
path: /etc/kubernetes/audit-policy.yaml path: /etc/kubernetes/audit-policy.yaml
@@ -295,8 +297,8 @@ and finally configure the `hostPath`:
- name: audit-log - name: audit-log
hostPath: hostPath:
path: /var/log/audit.log path: /var/log/kubernetes/audit/
type: FileOrCreate type: DirectoryOrCreate
``` ```
<!-- <!--