diff --git a/content/zh/docs/tasks/debug-application-cluster/audit.md b/content/zh/docs/tasks/debug-application-cluster/audit.md index 6ba032c030..b4b4c9ee66 100644 --- a/content/zh/docs/tasks/debug-application-cluster/audit.md +++ b/content/zh/docs/tasks/debug-application-cluster/audit.md @@ -267,7 +267,7 @@ to the location of the policy file and log file, so that audit records are persi ```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 ``` 接下来挂载数据卷: @@ -277,7 +277,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 ``` @@ -288,6 +288,8 @@ and finally configure the `hostPath`: 最后配置 `hostPath`: ```yaml +... +volumes: - name: audit hostPath: path: /etc/kubernetes/audit-policy.yaml @@ -295,8 +297,8 @@ and finally configure the `hostPath`: - name: audit-log hostPath: - path: /var/log/audit.log - type: FileOrCreate + path: /var/log/kubernetes/audit/ + type: DirectoryOrCreate ```