Skip to content

Commit

Permalink
kubernetes: disable non-helm (#828)
Browse files Browse the repository at this point in the history
* kubernetes: disable non-helm

Signed-off-by: Patrick Stephens <[email protected]>

* kubernetes: helm default

Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens authored Jun 22, 2022
1 parent 808f149 commit c32547e
Showing 1 changed file with 5 additions and 65 deletions.
70 changes: 5 additions & 65 deletions installation/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,79 +31,19 @@ To obtain this information, a built-in filter plugin called _kubernetes_ talks t
## Installation <a href="installation" id="installation"></a>

[Fluent Bit](http://fluentbit.io) must be deployed as a DaemonSet, so on that way 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:
[Fluent Bit](http://fluentbit.io) should be deployed as a DaemonSet, so on that way it will be available on every node of your Kubernetes cluster.

For Kubernetes v1.21 and below

```
$ kubectl create namespace logging
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-service-account.yaml
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role.yaml
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding.yaml
```

For Kubernetes v1.22

```
$ kubectl create namespace logging
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-service-account.yaml
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-1.22.yaml
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding-1.22.yaml
```

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

```
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-configmap.yaml
```

The default configmap assumes that dockershim is utilized for the cluster. If a CRI runtime, such as containerd or CRI-O, is being utilized, the [CRI parser](https://github.com/fluent/fluent-bit/blob/master/conf/parsers.conf#L106-L112) should be utilized. More specifically, change the `Parser` described in `input-kubernetes.conf` from docker to cri.
The recommended way to deploy Fluent Bit is with the official Helm Chart: https://github.com/fluent/helm-chart

### Note for OpenShift

If you are using Red Hat OpenShift you will also need to run the following
If you are using Red Hat OpenShift you will also need to set up security context constraints (SCC):

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

### Note for Kubernetes < v1.16

For Kubernetes versions older than v1.16, the DaemonSet resource is not available on `apps/v1` , the resource is available on `apiVersion: extensions/v1beta1` . Our current Daemonset Yaml files uses the new `apiVersion`.

If you are using and older Kubernetes version, manually grab a copy of your Daemonset Yaml file and replace the value of `apiVersion` from:

```yaml
apiVersion: apps/v1
```
to
```yaml
apiVersion: extensions/v1beta1
```
You can read more about this deprecation on Kubernetes v1.14 Changelog here:
[https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.14.md#deprecations](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.14.md#deprecations)
### Fluent Bit to Elasticsearch
Fluent Bit DaemonSet ready to be used with Elasticsearch on a normal Kubernetes Cluster:
```
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds.yaml
```

### Fluent Bit to Elasticsearch on Minikube

If you are using Minikube for testing purposes, use the following alternative DaemonSet manifest:

```
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds-minikube.yaml
```

## Installing with Helm Chart
### Installing with Helm Chart

[Helm](https://helm.sh) is a package manager for Kubernetes and allows you to quickly deploy application packages into your running cluster. Fluent Bit is distributed via a helm chart found in the Fluent Helm Charts repo: [https://github.com/fluent/helm-charts](https://github.com/fluent/helm-charts).

Expand All @@ -116,7 +56,7 @@ helm repo add fluent https://fluent.github.io/helm-charts
To validate that the repo was added you can run `helm search repo fluent` to ensure the charts were added. The default chart can then be installed by running the following

```
helm install fluent-bit fluent/fluent-bit
helm upgrade --install fluent-bit fluent/fluent-bit
```

### Default Values
Expand Down

0 comments on commit c32547e

Please sign in to comment.