Add Fluentd as a Receiver

    • How to deploy Fluentd as a Deployment and create the corresponding Service and ConfigMap.
    • How to add Fluentd as a log receiver to receive logs sent from Fluent Bit and then output to stdout.
    • You need a user granted a role including the permission of Cluster Management. For example, you can log in to the console as directly or create a new role with the permission and assign it to a user.

    • Before adding a log receiver, you need to enable any of the logging, events, or components. For more information, see Enable Pluggable Components. logging is enabled as an example in this tutorial.

    Usually, Fluentd is deployed as a DaemonSet in Kubernetes to collect container logs on each node. KubeSphere chooses Fluent Bit because of its low memory footprint. Besides, Fluentd features numerous output plugins. Hence, KubeSphere chooses to deploy Fluentd as a Deployment to forward logs it receives from Fluent Bit to more destinations such as S3, MongoDB, Cassandra, MySQL, syslog and Splunk.

    Run the following commands:

    Note

    • The following commands create the Fluentd Deployment, Service, and ConfigMap in the default namespace and add a filter to the Fluentd ConfigMap to exclude logs from the namespace to avoid Fluent Bit and Fluentd loop log collections.
    • Change the namespace if you want to deploy Fluentd into a different namespace.
    1. Note

      If you have enabled the , you can select a specific cluster.

    2. On the Cluster Management page, go to Log Receivers in Cluster Settings.

    3. Provide the Fluentd service address and port number.

    1. Click Application Workloads on the Cluster Management page.

    2. Select Workloads and then select the default project on the Deployments tab.

    3. Click the fluentd item and then select the fluentd-xxxxxxxxx-xxxxx Pod.

    4. Click the fluentd container.