From 3e010faa31a4137d3d638ab93026efbbbd757f44 Mon Sep 17 00:00:00 2001 From: AATHITH <45624180+AATHITH@users.noreply.github.com> Date: Mon, 6 Apr 2020 10:41:59 +0530 Subject: [PATCH 1/5] changed apiversion and added spec.selectors. This YAML is compatible with kubernetes version 1.16 and above. Signed-off-by: AATHITH <aathith2@gmail.com> --- .../elasticsearch/fluent-bit-ds(v1.16+).yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 output/elasticsearch/fluent-bit-ds(v1.16+).yaml diff --git a/output/elasticsearch/fluent-bit-ds(v1.16+).yaml b/output/elasticsearch/fluent-bit-ds(v1.16+).yaml new file mode 100644 index 0000000..0d9c9dd --- /dev/null +++ b/output/elasticsearch/fluent-bit-ds(v1.16+).yaml @@ -0,0 +1,65 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: fluent-bit + namespace: logging + labels: + k8s-app: fluent-bit-logging + version: v1 + kubernetes.io/cluster-service: "true" +spec: + selectors: + matchLabels: + k8s-app: fluent-bit-logging + version: v1 + kubernetes.io/cluster-service: "true" + template: + metadata: + labels: + k8s-app: fluent-bit-logging + version: v1 + kubernetes.io/cluster-service: "true" + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "2020" + prometheus.io/path: /api/v1/metrics/prometheus + spec: + containers: + - name: fluent-bit + image: fluent/fluent-bit:1.3.11 + imagePullPolicy: Always + ports: + - containerPort: 2020 + env: + - name: FLUENT_ELASTICSEARCH_HOST + value: "elasticsearch" + - name: FLUENT_ELASTICSEARCH_PORT + value: "9200" + volumeMounts: + - name: varlog + mountPath: /var/log + - name: varlibdockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + - name: fluent-bit-config + mountPath: /fluent-bit/etc/ + terminationGracePeriodSeconds: 10 + volumes: + - name: varlog + hostPath: + path: /var/log + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers + - name: fluent-bit-config + configMap: + name: fluent-bit-config + serviceAccountName: fluent-bit + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + - operator: "Exists" + effect: "NoExecute" + - operator: "Exists" + effect: "NoSchedule" From 005f6af938a033c4028de3f6ea5e026c4cf35dc3 Mon Sep 17 00:00:00 2001 From: AATHITH <45624180+AATHITH@users.noreply.github.com> Date: Mon, 6 Apr 2020 10:48:16 +0530 Subject: [PATCH 2/5] Update README.md added kubectl create daemonset command for Kubernetes cluster v1.16 and above Signed-off-by: AATHITH <aathith2@gmail.com> modified: README.md Signed-off-by: AATHITH <aathith2@gmail.com> --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ca2986b..fe15ca7 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,11 @@ 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 ``` +Fluent Bit DaemonSet ready to be used with Elasticsearch on a normal Kubernetes Cluster v1.16 and above: +``` +$ kubectl create -f https://raw.githubusercontent.com/AATHITH/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds(v1.16%2B).yaml +``` #### Fluent Bit to Elasticsearch on Minikube If you are using Minikube for testing purposes, use the following alternative DaemonSet manifest: @@ -57,13 +61,6 @@ 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: - -``` -$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds-minikube.yaml -``` ## Details From 1b93654110ba19d69e848aa4f1cab1d724d95058 Mon Sep 17 00:00:00 2001 From: AATHITH <45624180+AATHITH@users.noreply.github.com> Date: Thu, 7 May 2020 15:12:29 +0530 Subject: [PATCH 3/5] Update fluent-bit-ds(v1.16+).yaml Signed-off-by: AATHITH <aathith2@gmail.com> --- output/elasticsearch/fluent-bit-ds(v1.16+).yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/elasticsearch/fluent-bit-ds(v1.16+).yaml b/output/elasticsearch/fluent-bit-ds(v1.16+).yaml index 0d9c9dd..297cad1 100644 --- a/output/elasticsearch/fluent-bit-ds(v1.16+).yaml +++ b/output/elasticsearch/fluent-bit-ds(v1.16+).yaml @@ -8,7 +8,7 @@ metadata: version: v1 kubernetes.io/cluster-service: "true" spec: - selectors: + selector: matchLabels: k8s-app: fluent-bit-logging version: v1 From 47105a59d3f03590ca0913a8dd5140760fdab3e3 Mon Sep 17 00:00:00 2001 From: AATHITH <45624180+AATHITH@users.noreply.github.com> Date: Sat, 30 May 2020 04:51:17 +0530 Subject: [PATCH 4/5] Delete fluent-bit-ds.yaml Signed-off-by: AATHITH <aathith2@gmail.com> --- output/elasticsearch/fluent-bit-ds.yaml | 60 ------------------------- 1 file changed, 60 deletions(-) delete mode 100644 output/elasticsearch/fluent-bit-ds.yaml diff --git a/output/elasticsearch/fluent-bit-ds.yaml b/output/elasticsearch/fluent-bit-ds.yaml deleted file mode 100644 index 486d757..0000000 --- a/output/elasticsearch/fluent-bit-ds.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - name: fluent-bit - namespace: logging - labels: - k8s-app: fluent-bit-logging - version: v1 - kubernetes.io/cluster-service: "true" -spec: - template: - metadata: - labels: - k8s-app: fluent-bit-logging - version: v1 - kubernetes.io/cluster-service: "true" - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "2020" - prometheus.io/path: /api/v1/metrics/prometheus - spec: - containers: - - name: fluent-bit - image: fluent/fluent-bit:1.3.11 - imagePullPolicy: Always - ports: - - containerPort: 2020 - env: - - name: FLUENT_ELASTICSEARCH_HOST - value: "elasticsearch" - - name: FLUENT_ELASTICSEARCH_PORT - value: "9200" - volumeMounts: - - name: varlog - mountPath: /var/log - - name: varlibdockercontainers - mountPath: /var/lib/docker/containers - readOnly: true - - name: fluent-bit-config - mountPath: /fluent-bit/etc/ - terminationGracePeriodSeconds: 10 - volumes: - - name: varlog - hostPath: - path: /var/log - - name: varlibdockercontainers - hostPath: - path: /var/lib/docker/containers - - name: fluent-bit-config - configMap: - name: fluent-bit-config - serviceAccountName: fluent-bit - tolerations: - - key: node-role.kubernetes.io/master - operator: Exists - effect: NoSchedule - - operator: "Exists" - effect: "NoExecute" - - operator: "Exists" - effect: "NoSchedule" From a9d6e455467170ef81f11d15481888ef835193a9 Mon Sep 17 00:00:00 2001 From: AATHITH <45624180+AATHITH@users.noreply.github.com> Date: Sat, 30 May 2020 04:51:40 +0530 Subject: [PATCH 5/5] Rename fluent-bit-ds(v1.16+).yaml to fluent-bit-ds.yaml Signed-off-by: AATHITH <aathith2@gmail.com> --- .../{fluent-bit-ds(v1.16+).yaml => fluent-bit-ds.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename output/elasticsearch/{fluent-bit-ds(v1.16+).yaml => fluent-bit-ds.yaml} (100%) diff --git a/output/elasticsearch/fluent-bit-ds(v1.16+).yaml b/output/elasticsearch/fluent-bit-ds.yaml similarity index 100% rename from output/elasticsearch/fluent-bit-ds(v1.16+).yaml rename to output/elasticsearch/fluent-bit-ds.yaml