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

fix dupe text; add kustomization files #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ $ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernet
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding.yaml
```

Alternatively, you can use [Kustomize](https://kustomize.io/), which is also built into newer versions of kubectl.

```
$ kustomize build github.com/fluent/fluent-bit-kubernetes-logging/output/kustomize | kubectl create -f -
```

#### Fluent Bit to Elasticsearch

The next step is to create a ConfigMap that will be used by our Fluent Bit DaemonSet:
Expand All @@ -35,6 +41,12 @@ Fluent Bit DaemonSet ready to be used with Elasticsearch on a normal Kubernetes
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds.yaml
```

Or, if you are using kustomize:

```
$ kustomize build github.com/fluent/fluent-bit-kubernetes-logging/output/elasticsearch/ | kubectl create -f -
```

#### Fluent Bit to Elasticsearch on Minikube

If you are using Minikube for testing purposes, use the following alternative DaemonSet manifest:
Expand All @@ -43,6 +55,12 @@ If you are using Minikube for testing purposes, use the following alternative Da
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds-minikube.yaml
```

Or, if you are using kustomize:

```
$ kustomize build github.com/fluent/fluent-bit-kubernetes-logging/output/elasticsearch-minikube | kubectl create -f -
```

#### Fluent Bit to Kafka

Create a ConfigMap that will be used by our Fluent Bit DaemonSet:
Expand All @@ -57,12 +75,10 @@ Fluent Bit DaemonSet ready to be used with Kafka on a normal Kubernetes Cluster:
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/kafka/fluent-bit-ds.yaml
```

#### Fluent Bit to Elasticsearch on Minikube

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

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

## Details
Expand Down
10 changes: 10 additions & 0 deletions output/elasticsearch-minikube/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: logging

bases:
- ../elasticsearch/

patchesStrategicMerge:
- fluent-bit-ds-minikube.yaml
11 changes: 11 additions & 0 deletions output/elasticsearch/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: logging

bases:
- ../kustomize

resources:
- fluent-bit-configmap.yaml
- fluent-bit-ds.yaml
11 changes: 11 additions & 0 deletions output/kafka/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: logging

bases:
- ../kustomize

resources:
- fluent-bit-configmap.yaml
- fluent-bit-ds.yaml
12 changes: 12 additions & 0 deletions output/kustomize/fluent-bit-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: fluent-bit-read
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: fluent-bit-read
subjects:
- kind: ServiceAccount
name: fluent-bit
namespace: logging
10 changes: 10 additions & 0 deletions output/kustomize/fluent-bit-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: fluent-bit-read
rules:
- apiGroups: [""]
resources:
- namespaces
- pods
verbs: ["get", "list", "watch"]
5 changes: 5 additions & 0 deletions output/kustomize/fluent-bit-service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: fluent-bit
namespace: logging
9 changes: 9 additions & 0 deletions output/kustomize/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: logging

resources:
- fluent-bit-service-account.yaml
- fluent-bit-role.yaml
- fluent-bit-role-binding.yaml