You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/inputs/kubernetes-events.md
+31-36Lines changed: 31 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,53 +1,49 @@
1
1
---
2
-
description: >-
3
-
Collects Kubernetes Events
2
+
description: Collect Kubernetes events
4
3
---
5
4
6
-
# Kubernetes Events
5
+
# Kubernetes events
7
6
8
-
Kubernetes exports it events through the API server. This input plugin allows to retrieve those events as logs and get them processed through the pipeline.
7
+
Kubernetes exports events through the API server. This input plugin lets you retrieve those events as logs and process them through the pipeline.
| kube_token_ttl | kubernetes token ttl, until it is reread from the token file. | 10m |
24
-
| kube_request_limit | kubernetes limit parameter for events query, no limit applied when set to 0. | 0 |
25
-
| kube_retention_time | Kubernetes retention time for events. | 1h |
26
-
| kube_namespace | Kubernetes namespace to query events from. Gets events from all namespaces by default ||
27
-
| tls.debug | Debug level between 0 (nothing) and 4 (every detail). | 0 |
28
-
| tls.verify | Enable or disable verification of TLS peer certificate. | On |
29
-
| tls.vhost | Set optional TLS virtual host. ||
30
-
31
-
32
-
-_* As of Fluent-Bit 3.1, this plugin uses a Kubernetes watch stream instead of polling. In versions before 3.1, the interval parameters are used for reconnecting the Kubernetes watch stream._
12
+
| Key | Description | Default |
13
+
| --- | ----------- | ------- |
14
+
|`db`| Set a database file to keep track of recorded Kubernetes events. |_none_|
15
+
|`db.sync`| Set a database sync method. Accepted values: `extra`, `full`, `normal`, `off`. |`normal`|
16
+
|`interval_sec`| Set the reconnect interval (seconds). |`0`|
17
+
|`interval_nsec`| Set the reconnect interval (sub seconds: nanoseconds). |`500000000`|
18
+
|`kube_url`| API Server endpoint. |`https://kubernetes.default.svc`|
19
+
|`kube_ca_file`| Kubernetes TLS CA file. |`/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`|
|`kube_token_ttl`| Kubernetes token time to live, until it's read again from the token file. |`10m`|
23
+
|`kube_request_limit`| Kubernetes limit parameter for events query, no limit applied when set to `0`. |`0`|
24
+
|`kube_retention_time`| Kubernetes retention time for events. |`1h`|
25
+
|`kube_namespace`| Kubernetes namespace to query events from. |`all`|
26
+
|`tls.debug`| Debug level between `0` (nothing) and `4` (every detail). |`0`|
27
+
|`tls.verify`| Enable or disable verification of TLS peer certificate. |`On`|
28
+
|`tls.vhost`| Set optional TLS virtual host. |_none_|
29
+
30
+
In Fluent Bit 3.1 or later, this plugin uses a Kubernetes watch stream instead of polling. In versions earlier than 3.1, the interval parameters are used for reconnecting the Kubernetes watch stream.
33
31
34
32
## Threading
35
33
36
34
This input always runs in its own [thread](../../administration/multithreading.md#inputs).
37
35
38
-
## Getting Started
36
+
## Get started
37
+
38
+
### Kubernetes service account
39
39
40
-
### Kubernetes Service Account
41
-
The Kubernetes service account used by Fluent Bit must have `get`, `list`, and `watch`
42
-
permissions to `namespaces` and `pods` for the namespaces watched in the
43
-
`kube_namespace` configuration parameter. If you're using the helm chart to configure
44
-
Fluent Bit, this role is included.
40
+
The Kubernetes service account used by Fluent Bit must have `get`, `list`, and `watch` permissions to `namespaces` and `pods` for the namespaces watched in the `kube_namespace` configuration parameter. If you're using the Helm chart to configure Fluent Bit, this role is included.
45
41
46
-
### Simple Configuration File
42
+
### Basic configuration file
47
43
48
-
In the following configuration file, the input plugin *kubernetes_events*collects events every 5 seconds (default for *interval_nsec*) and exposes them through the [standard output plugin](../outputs/standard-output.md) on the console.
44
+
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:
49
45
50
-
```text
46
+
```python
51
47
[SERVICE]
52
48
flush 1
53
49
log_level info
@@ -62,10 +58,9 @@ In the following configuration file, the input plugin *kubernetes_events* collec
62
58
match *
63
59
```
64
60
65
-
### Event Timestamp
61
+
### Event timestamp
66
62
67
-
Event timestamps are created from the first existing field, based on the following
68
-
order of precedence:
63
+
Event timestamps are created from the first existing field, based on the following order of precedence:
0 commit comments