File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
content/en/docs/tasks/debug-application-cluster Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,40 @@ log audit backend using the following `kube-apiserver` flags:
134
134
- ` --audit-log-maxbackup` defines the maximum number of audit log files to retain
135
135
- ` --audit-log-maxsize` defines the maximum size in megabytes of the audit log file before it gets rotated
136
136
137
+ In case kube-apiserver is configured as a Pod,remember to mount the hostPath to the location of the policy file and log file. For example,
138
+ `
139
+ --audit-policy-file=/etc/kubernetes/audit-policy.yaml
140
+ --audit-log-path=/var/log/audit.log
141
+ `
142
+ then mount the volumes :
143
+
144
+
145
+ ` ` `
146
+ volumeMounts:
147
+ - mountPath: /etc/kubernetes/audit-policy.yaml
148
+ name: audit
149
+ readOnly: true
150
+ - mountPath: /var/log/audit.log
151
+ name: audit-log
152
+ readOnly: false
153
+ ` ` `
154
+ finally the hostPath :
155
+
156
+ ` ` `
157
+ - name: audit
158
+ hostPath:
159
+ path: /etc/kubernetes/audit-policy.yaml
160
+ type: File
161
+
162
+ - name: audit-log
163
+ hostPath:
164
+ path: /var/log/audit.log
165
+ type: FileOrCreate
166
+
167
+ ` ` `
168
+
169
+
170
+
137
171
# ## Webhook backend
138
172
139
173
Webhook backend sends audit events to a remote API, which is assumed to be the
You can’t perform that action at this time.
0 commit comments