Skip to content

Commit 1cfde96

Browse files
authored
Added YAML configuration to kubernetes installation docs. Fixes #1737. (#1738)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 2359245 commit 1cfde96

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

installation/kubernetes.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,49 @@ spec:
144144
145145
### Configure Fluent Bit
146146
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" %}
149151
150152
```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
151190
fluent-bit.conf: |
152191
[SERVICE]
153192
Parsers_File C:\\fluent-bit\\parsers.conf
@@ -185,6 +224,9 @@ parsers.conf: |
185224
Time_Keep On
186225
```
187226
227+
{% endtab %}
228+
{% endtabs %}
229+
188230
### Mitigate unstable network on Windows pods
189231
190232
Windows pods often lack working DNS immediately after boot
@@ -198,10 +240,28 @@ starts up:
198240
By default, Fluent Bit waits for three minutes (30 seconds x 6 times). If it's not enough
199241
for you, update the configuration as follows:
200242

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
202259
[filter]
203260
Name kubernetes
204261
...
205262
DNS_Retries 10
206263
DNS_Wait_Time 30
207264
```
265+
266+
% endtab %}
267+
{% endtabs %}

0 commit comments

Comments
 (0)