From 88f67ddc49c241b52279b50afe9667211834fa62 Mon Sep 17 00:00:00 2001 From: ryanohnemus Date: Wed, 19 Jun 2024 06:36:30 -0500 Subject: [PATCH 1/4] in_kubernetes_events: add k8s permission details fluent/fluent-bit#8351 Signed-off-by: ryanohnemus --- pipeline/inputs/kubernetes-events.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pipeline/inputs/kubernetes-events.md b/pipeline/inputs/kubernetes-events.md index 164c4eb60..3adee0f4f 100644 --- a/pipeline/inputs/kubernetes-events.md +++ b/pipeline/inputs/kubernetes-events.md @@ -14,8 +14,8 @@ Kubernetes exports it events through the API server. This input plugin allows to |---------------------|---------------------------------------------------------------------------------------|------------------------------------------------------| | db | Set a database file to keep track of recorded Kubernetes events | | | db.sync | Set a database sync method. values: extra, full, normal and off | normal | -| interval_sec | Set the polling interval for each channel. | 0 | -| interval_nsec | Set the polling interval for each channel (sub seconds: nanoseconds) | 500000000 | +| interval_sec | Set the reconnect interval (seconds)* | 0 | +| interval_nsec | Set the reconnect interval (sub seconds: nanoseconds)* | 500000000 | | kube_url | API Server end-point | https://kubernetes.default.svc | | kube_ca_file | Kubernetes TLS CA file | /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | | kube_ca_path | Kubernetes TLS ca path | | @@ -28,8 +28,15 @@ Kubernetes exports it events through the API server. This input plugin allows to | tls.verify | Enable or disable verification of TLS peer certificate. | On | | tls.vhost | Set optional TLS virtual host. | | + +- _* as of Fluent-Bit 3.1 this plugin uses a kubernetes watch stream instead of polling. The interval parameters in versions > 3.1 are used for reconnecting the kubernetes watch stream._ + + ## Getting Started +### Kubernetes Service Account +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` config parameter. If you are using the helm chart to set up fluent-bit, this role is included. + ### Simple Configuration File 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. From b91209e2e2f6a5f9477f73a22246a6668955823e Mon Sep 17 00:00:00 2001 From: Ryan Ohnemus Date: Fri, 21 Jun 2024 15:55:08 -0500 Subject: [PATCH 2/4] Update pipeline/inputs/kubernetes-events.md Co-authored-by: Adam Locke Signed-off-by: Ryan Ohnemus --- pipeline/inputs/kubernetes-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/inputs/kubernetes-events.md b/pipeline/inputs/kubernetes-events.md index 3adee0f4f..b720101d4 100644 --- a/pipeline/inputs/kubernetes-events.md +++ b/pipeline/inputs/kubernetes-events.md @@ -29,7 +29,7 @@ Kubernetes exports it events through the API server. This input plugin allows to | tls.vhost | Set optional TLS virtual host. | | -- _* as of Fluent-Bit 3.1 this plugin uses a kubernetes watch stream instead of polling. The interval parameters in versions > 3.1 are used for reconnecting the kubernetes watch stream._ +- _* 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._ ## Getting Started From 0a7834fa6d396ee8b077bfce404b36138d182f1a Mon Sep 17 00:00:00 2001 From: Ryan Ohnemus Date: Fri, 21 Jun 2024 15:55:16 -0500 Subject: [PATCH 3/4] Update pipeline/inputs/kubernetes-events.md Co-authored-by: Adam Locke Signed-off-by: Ryan Ohnemus --- pipeline/inputs/kubernetes-events.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline/inputs/kubernetes-events.md b/pipeline/inputs/kubernetes-events.md index b720101d4..77faa3d49 100644 --- a/pipeline/inputs/kubernetes-events.md +++ b/pipeline/inputs/kubernetes-events.md @@ -35,8 +35,10 @@ Kubernetes exports it events through the API server. This input plugin allows to ## Getting Started ### Kubernetes Service Account -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` config parameter. If you are using the helm chart to set up fluent-bit, this role is included. - +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. ### Simple Configuration File 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. From 8b11e766ff70aa8995599d02d58fef7577993b7c Mon Sep 17 00:00:00 2001 From: Adam Locke Date: Mon, 24 Jun 2024 08:33:21 -0400 Subject: [PATCH 4/4] Add hard return to break section Signed-off-by: Adam Locke --- pipeline/inputs/kubernetes-events.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pipeline/inputs/kubernetes-events.md b/pipeline/inputs/kubernetes-events.md index 77faa3d49..9d4731bff 100644 --- a/pipeline/inputs/kubernetes-events.md +++ b/pipeline/inputs/kubernetes-events.md @@ -39,6 +39,7 @@ The Kubernetes service account used by Fluent Bit must have `get`, `list`, and ` 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. + ### Simple Configuration File 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.