Skip to content

Commit cd9e74f

Browse files
authored
Adding YAML examples for k8s events input plugin docs. Fixes #1815. (#1816)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 2774902 commit cd9e74f

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

pipeline/inputs/kubernetes-events.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,30 @@ The Kubernetes service account used by Fluent Bit must have `get`, `list`, and `
4343

4444
In the following configuration file, the Kubernetes events plugin collects events every `5` seconds (default for `interval_nsec`) and exposes them through the [standard output plugin](../outputs/standard-output.md) on the console:
4545

46-
```python
46+
47+
{% tabs %}
48+
{% tab title="fluent-bit.yaml" %}
49+
50+
```yaml
51+
service:
52+
flush: 1
53+
log_level: info
54+
55+
pipeline:
56+
inputs:
57+
- name: kubernetes_events
58+
tag: k8s_events
59+
kube_url: https://kubernetes.default.svc
60+
61+
outputs:
62+
- name: stdout
63+
match: '*'
64+
```
65+
66+
{% endtab %}
67+
{% tab title="fluent-bit.conf" %}
68+
69+
```text
4770
[SERVICE]
4871
flush 1
4972
log_level info
@@ -58,10 +81,13 @@ In the following configuration file, the Kubernetes events plugin collects event
5881
match *
5982
```
6083

84+
{% endtab %}
85+
{% endtabs %}
86+
6187
### Event timestamp
6288

6389
Event timestamps are created from the first existing field, based on the following order of precedence:
6490

6591
1. `lastTimestamp`
66-
1. `firstTimestamp`
67-
1. `metadata.creationTimestamp`
92+
2. `firstTimestamp`
93+
3. `metadata.creationTimestamp`

0 commit comments

Comments
 (0)