Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit e65bc1a

Browse files
committed
Add new files for v1.22 kubernetes and modify instructions
1 parent 04b5737 commit e65bc1a

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

Diff for: README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,45 @@
22

33

44

5-
[Fluent Bit](http://fluentbit.io) is a lightweight and extensible __Log Processor__ that comes with full support for Kubernetes:
5+
[Fluent Bit](http://fluentbit.io) is a lightweight and extensible __Log and Metrics Processor__ that comes with full support for Kubernetes:
66

77
- Read Kubernetes/Docker log files from the file system or through systemd Journal
88
- Enrich logs with Kubernetes metadata
9-
- Deliver logs to third party storage services like Elasticsearch, InfluxDB, HTTP, etc.
9+
- Deliver logs to third party services like Elasticsearch, Splunk, Datadog, InfluxDB, HTTP, etc.
1010

1111
This repository contains a set of Yaml files to deploy Fluent Bit which consider namespace, RBAC, Service Account, etc.
1212

1313
## Getting started
1414

1515
[Fluent Bit](http://fluentbit.io) must be deployed as a DaemonSet so that it will be available on every node of your Kubernetes cluster. To get started run the following commands to create the namespace, service account and role setup:
1616

17+
18+
For Kubernetes v1.21 and below
19+
1720
```
1821
$ kubectl create namespace logging
1922
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-service-account.yaml
2023
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role.yaml
2124
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding.yaml
2225
```
2326

27+
For Kubernetes v1.22 and above
28+
29+
```
30+
$ kubectl create namespace logging
31+
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-service-account.yaml
32+
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-1.22.yaml
33+
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding-1.22.yaml
34+
```
35+
36+
2437
If you are deploying fluent-bit on openshift, you additionally need to run:
2538

2639
```
2740
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-openshift-security-context-constraints.yaml
2841
```
2942

43+
3044
#### Fluent Bit to Elasticsearch
3145

3246
The next step is to create a ConfigMap that will be used by our Fluent Bit DaemonSet:

Diff for: fluent-bit-role-1.22.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
name: fluent-bit-read
5+
rules:
6+
- apiGroups: [""]
7+
resources:
8+
- namespaces
9+
- pods
10+
verbs: ["get", "list", "watch"]
11+
diff --git a/fluent-bit-role-binding-1.22.yaml b/fluent-bit-role-binding-1.22.yaml

Diff for: fluent-bit-role-binding-1.22.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: fluent-bit-read
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: ClusterRole
8+
name: fluent-bit-read
9+
subjects:
10+
- kind: ServiceAccount
11+
name: fluent-bit
12+
namespace: logging
13+

0 commit comments

Comments
 (0)