@@ -144,10 +144,49 @@ spec:
144
144
145
145
### Configure Fluent Bit
146
146
147
- Assuming the basic volume configuration described previously, you can apply the
148
- following configuration to start logging:
147
+ Assuming the basic volume configuration described previously, you can apply one of the following configurations to start logging:
148
+
149
+ {% tabs %}
150
+ {% tab title="fluent-bit.yaml" %}
149
151
150
152
` ` ` yaml
153
+ parsers :
154
+ - name : docker
155
+ format : json
156
+ time_key : time
157
+ time_format : ' %Y-%m-%dT%H:%M:%S.%L'
158
+ time_keep : true
159
+
160
+ pipeline :
161
+ inputs :
162
+ - name : tail
163
+ tag : kube.*
164
+ path : ' C:\\var\\log\\containers\\*.log'
165
+ parser : docker
166
+ db : ' C:\\fluent-bit\\tail_docker.db'
167
+ mem_buf_limit : 7MB
168
+ refresh_interval : 10
169
+
170
+ - name : tail
171
+ tag : kube.error
172
+ path : ' C:\\k\\kubelet.err.log'
173
+ db : ' C:\\fluent-bit\\tail_kubelet.db'
174
+
175
+ filters :
176
+ - name : kubernetes
177
+ match : kube.*
178
+ kube_url : ' https://kubernetes.default.svc.cluster.local:443'
179
+
180
+ outputs :
181
+ - name : stdout
182
+ match : ' *'
183
+ ` ` `
184
+
185
+ {% endtab %}
186
+
187
+ {% tab title="fluent-bit.conf" %}
188
+
189
+ ` ` ` text
151
190
fluent-bit.conf : |
152
191
[SERVICE]
153
192
Parsers_File C:\\fluent-bit\\parsers.conf
@@ -185,6 +224,9 @@ parsers.conf: |
185
224
Time_Keep On
186
225
` ` `
187
226
227
+ {% endtab %}
228
+ {% endtabs %}
229
+
188
230
### Mitigate unstable network on Windows pods
189
231
190
232
Windows pods often lack working DNS immediately after boot
@@ -198,10 +240,28 @@ starts up:
198
240
By default, Fluent Bit waits for three minutes (30 seconds x 6 times). If it's not enough
199
241
for you, update the configuration as follows :
200
242
201
- ` ` ` python
243
+ {% tabs %}
244
+ {% tab title="fluent-bit.yaml" %}
245
+
246
+ ` ` ` yaml
247
+ filters:
248
+ - name: kubernetes
249
+ ...
250
+ dns_retries: 10
251
+ dns_wait_time: 30
252
+ ` ` `
253
+
254
+ {% endtab %}
255
+
256
+ {% tab title="fluent-bit.conf" %}
257
+
258
+ ` ` ` text
202
259
[filter]
203
260
Name kubernetes
204
261
...
205
262
DNS_Retries 10
206
263
DNS_Wait_Time 30
207
264
` ` `
265
+
266
+ % endtab %}
267
+ {% endtabs %}
0 commit comments