FluentD Examples¶
FluentD is a data collector for unified logging layer. These examples cover various runtime environments and deployment scenarios, from simple setups to complex multi-platform configurations.
Simple Deployment¶
Basic FluentD configuration suitable for most Kubernetes environments:
fluentd-simple-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Container Runtime Configurations¶
Docker Runtime¶
Standard Docker environment configuration:
fluentd-docker-runtime-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Cloud containers runtime software. Possible values: docker/cri-o/containerd. In fact so far he differ docker and non-docker environments
containerRuntimeType: docker
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Containerd Runtime¶
Configuration optimized for containerd container runtime:
fluentd-containerd-runtime-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Cloud containers runtime software. Possible values: docker/cri-o/containerd. In fact so far he differ docker and non-docker environments
containerRuntimeType: containerd
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
OpenShift with Containerd¶
OpenShift-specific configuration with containerd runtime:
fluentd-openshift-containerd-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Cloud containers runtime software. Possible values: docker/cri-o/containerd. In fact so far he differ docker and non-docker environments
containerRuntimeType: containerd
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Operating System Specific¶
CentOS with Docker¶
Optimized configuration for CentOS-based Docker environments:
fluentd-centos-docker-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Operating system kind on cloud nodes: centos/rhel/oracle/ubuntu
osKind: centos
# Cloud containers runtime software. Possible values: docker/cri-o/containerd. In fact so far he differ docker and non-docker environments
containerRuntimeType: docker
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Ubuntu with Containerd¶
Configuration tailored for Ubuntu systems with containerd:
fluentd-ubuntu-containerd-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Operating system kind on cloud nodes: centos/rhel/oracle/ubuntu
osKind: ubuntu
# Cloud containers runtime software. Possible values: docker/cri-o/containerd. In fact so far he differ docker and non-docker environments
containerRuntimeType: containerd
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Advanced Configurations¶
Custom Input and Filter¶
Advanced configuration with custom input sources and filtering rules:
fluentd-custom-input-filter-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
# Custom FluentD configurations
customInputConf: |-
<source>
custom_input_configuration
</source>
customFilterConf: |-
<filter raw.kubernetes.var.log.**>
custom_filter_configuration
</filter>
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Node Selector Deployment¶
Targeted deployment using node selectors:
fluentd-with-node-selector-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
fluentd:
install: true
graylogHost: 1.2.3.4
graylogPort: 12201
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
nodeSelectorKey: kubernetes.io/os
nodeSelectorValue: linux
Without Graylog Output¶
Configuration for alternative output destinations:
fluentd-without-graylog-output-values.yaml
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
fluentd:
install: true
# Disable Graylog output
graylogOutput: false
customOutputConf: |-
<store ignore_error>
custom_output_configuration
</store>
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
Key Configuration Parameters¶
Parameter | Description | Values |
---|---|---|
fluentd.install |
Enable FluentD deployment | true /false |
fluentd.graylogHost |
Graylog server hostname/IP | Hostname or IP |
fluentd.graylogPort |
Graylog input port | Port number (default: 12201) |
fluentd.resources |
Resource requests and limits | CPU/Memory specifications |
fluentd.nodeSelector |
Node selection criteria | Key-value pairs |
containerRuntimeType |
Container runtime type | docker /cri-o /containerd |
osKind |
Operating system type | centos /rhel /oracle /ubuntu |
Use Cases¶
- Simple Deployment: Standard Kubernetes clusters with basic logging needs
- Container Runtime Specific: Environments with specific container runtime requirements
- OS-Specific: Optimized configurations for different operating systems
- Custom Processing: Advanced log processing and routing requirements
- Node Targeting: Specific node deployment requirements
- Alternative Outputs: Non-Graylog output destinations