1# ⚠️  DEPRECATED - Fluent Bit Loki chart
2
3This chart was moved to <https://github.com/grafana/helm-charts>.
4
5This chart install the Fluent Bit application to ship logs to Loki. It defines daemonset on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
6
7## Installing the Chart
8
9> If you don't have `Helm` installed locally, or `Tiller` installed in your Kubernetes cluster, read the [Using Helm](https://docs.helm.sh/using_helm/) documentation to get started.
10To install the chart with the release name `my-release` using our helm repository:
11
12```bash
13helm repo add loki https://grafana.github.io/loki/charts
14helm upgrade --install my-release loki/fluent-bit \
15    --set loki.serviceName=loki.default.svc.cluster.local
16```
17
18If you deploy Loki with a custom namespace or service name, you must change the value above for `loki.serviceName` to the appropriate value.
19
20The command deploys Fluent Bit on the Kubernetes cluster with the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
21
22To configure the chart to send to [Grafana Cloud](https://grafana.com/products/cloud) use:
23
24```bash
25helm upgrade --install my-release loki/fluent-bit \
26    --set loki.serviceName=logs-us-west1.grafana.net,loki.servicePort=80,loki.serviceScheme=https \
27    --set loki.user=2830,loki.password=1234
28```
29
30> **Tip**: List all releases using `helm list`
31
32To install a custom tag use the following command:
33
34```bash
35helm upgrade --install my-release loki/fluent-bit \
36    --set image.tag=<custom tag>
37```
38
39The full list of available tags on [docker hub](https://cloud.docker.com/u/grafana/repository/docker/grafana/fluent-bit-plugin-loki).
40
41Alternatively you can install the full [Loki stack](../loki-stack) (Loki + Fluent Bit) using:
42
43```bash
44helm upgrade --install my-release loki/loki-stack \
45    --set fluent-bit.enabled=true,promtail.enabled=false
46```
47
48This will automatically configured the `loki.serviceName` configuration field to the newly created Loki instance.
49
50## RBAC
51
52By default, `rbac.create` is set to true. This enable RBAC support in Fluent Bit and must be true if RBAC is enabled in your cluster.
53
54The chart will take care of creating the required service accounts and roles for Fluent Bit.
55
56If you have RBAC disabled, or to put it another way, ABAC enabled, you should set this value to `false`.
57
58## Uninstalling the Chart
59
60To uninstall/delete the `my-release` deployment:
61
62```bash
63helm delete my-release
64```
65
66The command removes all the Kubernetes components associated with the chart and deletes the release.
67
68## Configuration
69
70The following tables lists the configurable parameters of the Fluent Bit chart and their default values.
71
72For more details, read the [Fluent Bit documentation](../../../clients/cmd/fluent-bit/README.md)
73
74| Parameter                | Description                                                                                        | Default                          |
75|--------------------------|----------------------------------------------------------------------------------------------------|----------------------------------|
76| `loki.serviceName`       | The address of the Loki service.                                                                   | `"${RELEASE}-loki"`              |
77| `loki.servicePort`       | The port of the Loki service.                                                                      | `3100`                           |
78| `loki.serviceScheme`     | The scheme of the Loki service.                                                                    | `http`                           |
79| `loki.user`              | The http basic auth username to access the Loki service.                                           |                                  |
80| `loki.password`          | The http basic auth password to access the Loki service.                                           |                                  |
81| `config.port`            | the Fluent Bit port to listen. (This is mainly used to serve metrics)                              | `2020`                           |
82| `config.tenantID`        | The tenantID used by default to push logs to Loki                                                  | `''`                             |
83| `config.batchWait`       | Time to wait before send a log batch to Loki, full or not. (unit: secs)                            | `1`                              |
84| `config.batchSize`       | Log batch size to send a log batch to Loki. (unit: bytes)                                          | `10240` (10KiB)                  |
85| `config.loglevel`        | the Fluent Bit log level (debug,info,warn,error).                                                  | `warn`                           |
86| `config.lineFormat`      | The line format to use to send a record (json/key_value)                                           | `json`                           |
87| `config.k8sLoggingParser`| Allow Kubernetes Pods to suggest a pre-defined Parser. See [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/filter/kubernetes#kubernetes-annotations).                                                                                      | `Off`                           |
88| `config.k8sLoggingExclude`| Allow Kubernetes Pods to exclude their logs from the log processor. See [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/pipeline/filters/kubernetes)                                                                                             | `Off`
89| `config.memBufLimit`     | Override the default  Mem_Buf_Limit [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/administration/backpressure#mem_buf_limit) | `5MB`
90| `config.removeKeys`      | The list of key to remove from each record                                                         | `[removeKeys,stream]`            |
91| `config.labels`          | A set of labels to send for every log                                                              | `'{job="fluent-bit"}'`           |
92| `config.autoKubernetesLabels` | If set to true, it will add all Kubernetes labels to Loki labels                                   | `false`                          |
93| `config.labelMap`        | Mapping of labels from a record. See [Fluent Bit documentation](../../../clients/cmd/fluent-bit/README.md) |                                  |
94| `config.parsers`         | Definition of extras fluent bit parsers. See [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/filter/parser). The format is a sequence of mappings where each key is the same as the one in the [PARSER] section of parsers.conf file       | `[]`                            |
95| `config.extraOutputs`    | Definition of extras fluent bit outputs. See [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/pipeline/outputs/). The format is a sequence of mappings where each key is the same as the one in the [OUTPUT]                                | `[]`                            |
96| `affinity`               | [affinity][affinity] settings for pod assignment                                                   | `{}`                             |
97| `annotations`            | Annotations to add to Kubernetes resources.                                                        | `{}`                             |
98| `deploymentStrategy`     | The deployment strategy to use with the daemonset                                                  | `RollingUpdate`                  |
99| `image.repository`       | The Fluent Bit docker image repository                                                             | `grafana/fluent-bit-plugin-loki` |
100| `image.tag`              | The Fluent Bit docker image tag                                                                    | `0.1`                            |
101| `image.pullPolicy`       | The Fluent Bit docker image pull policy                                                            | `IfNotPresent`                   |
102| `nodeSelector`           | Fluent Bit [node labels][nodeSelector] for pod assignment                                          | `{}`                             |
103| `podLabels`              | additional Fluent Bit pod labels                                                                   | `{}`                             |
104| `podAnnotations`         | additional Fluent Bit pod annotations                                                              | `Prometheus discovery`           |
105| `rbac.create`            | Activate support for RBAC                                                                          | `true`                           |
106| `resources`              | Resource requests/limit                                                                            |                                  |
107| `tolerations`            | [Toleration][toleration] labels for pod assignment                                                 | `no schedule on master nodes`    |
108| `volumes`                | [Volume]([volumes]) to mount                                                                       | `host containers log`            |
109| `volumeMounts`           | Volume mount mapping                                                                               |                                  |
110| `serviceMonitor.enabled` | Create a [Prometheus Operator](operator) serviceMonitor resource for Fluent Bit                    | `false`                          |
111
112
113[toleration]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
114[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
115[affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
116[volumes]: https://kubernetes.io/docs/concepts/storage/volumes/
117[operator]: https://github.com/coreos/prometheus-operator
118