Aggregating logs with Fluent Bit

Let's perform the following steps to get fluent-bit deployed:

  1. Get the password for the default elastic user:
$ kubectl get secret elasticsearch-es-elastic-user 
-n logging -o=jsonpath='{.data.elastic}' | base64 --decode; echo
  1. Copy the output of Step 1 and edit the fluent-bit-values.yaml file in the /src/chapter10/efk directory. Replace the http_passwd value with the output of Step 1 and save the file:
backend:
type: es
es:
host: elasticsearch-es-http
port: 9200
http_user: elastic
http_passwd: m2zr9fz49zqbkbpksprf4r76
# Optional TLS encryption to ElasticSearch instance
tls: "on"
tls_verify: "off"
  1. Deploy fluent-bit using the Helm chart:
$ helm install stable/fluent-bit --name=fluent-bit --namespace=logging -f fluent-bit-values.yaml
  1. Confirm the pod's status in the logging namespace using the following command:
$ kubectl get pods -n logging
NAME READY STATUS RESTARTS AGE
elasticsearch-es-default-0 1/1 Running 0 158m
elasticsearch-es-default-1 1/1 Running 0 158m
elasticsearch-es-default-2 1/1 Running 0 158m
fluent-bit-249ct 1/1 Running 0 2m11s
fluent-bit-4nb9k 1/1 Running 0 2m11s
fluent-bit-fqtz9 1/1 Running 0 2m11s
fluent-bit-lg9hn 1/1 Running 0 2m11s
mykibana-kb-5596b888b5-qv8wn 1/1 Running 0 115m

With that, you have deployed all the components of the EFK stack. Next, we will connect to the Kibana dashboard.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.158.32