fluent-operator
by Fluent
Kubernetes operator for Fluent Bit and Fluentd—define collectors, pipelines, and outputs as custom resources.
About this chart
fluent-operator
Kubernetes operator for Fluent Bit and Fluentd—define collectors, pipelines, and outputs as custom resources.
[!IMPORTANT] Upgrading from v3 to v4? Read MIGRATION-v4.md for detailed information and breaking changes!
Homepage: https://github.com/fluent/fluent-operator
Maintainers
| Name | Url | |
|---|---|---|
| wenchajun | [email protected] | |
| marcofranssen | [email protected] | https://marcofranssen.nl |
| joshuabaird | [email protected] |
Source Code
Installing the Chart
OCI Repository
To install the chart using the recommended OCI method you can use the following command.
helm upgrade --install fluent-operator oci://ghcr.io/fluent/helm-charts/fluent-operator --version 4.4.0
Verification
As the OCI chart release is signed by Cosign you can verify the chart before installing it by running the following command.
cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp 'https://github\.com/action-stars/helm-workflows/\.github/workflows/release\.yaml@.+' --certificate-github-workflow-repository fluent/helm-charts --certificate-github-workflow-name Release ghcr.io/fluent/helm-charts/fluent-operator:4.4.0
Non-OCI Repository
Alternatively you can use the legacy non-OCI method via the following commands.
helm repo add fluent https://fluent.github.io/helm-charts/
helm upgrade --install fluent-operator fluent/fluent-operator --version 4.4.0
Values
| Key | Type | Default | Description |
|---|---|---|---|
| Kubernetes | bool | true | Deploy default Fluent Bit pipeline to collect Kubernetes logs. See https://github.com/fluent/fluent-operator/tree/master/manifests/logging-stack |
| containerRuntime | string | "containerd" | Container runtime used by your Kubernetes cluster. Supported values: containerd, crio, docker |
| fluentbit | object | {"additionalVolumes":[],"additionalVolumesMounts":[],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/edge","operator":"DoesNotExist"}]}]}}},"annotations":{},"args":[],"command":[],"disableLogVolumes":false,"enable":true,"envVars":[],"filter":{"containerd":{"enable":true},"kubernetes":{"annotations":false,"enable":true,"labels":false},"multiline":{"buffer":false,"emitterMemBufLimit":120,"emitterType":"memory","enable":false,"flushMs":2000,"keyContent":"log","parsers":["go","python","java"]},"systemd":{"enable":true}},"hostNetwork":false,"image":{"registry":"ghcr.io","repository":"fluent/fluent-operator/fluent-bit","tag":"5.1.5"},"imagePullSecrets":[],"initContainers":[],"input":{"fluentBitMetrics":{},"nodeExporterMetrics":{},"systemd":{"enable":true,"includeKubelet":true,"path":"/var/log/journal","pauseOnChunksOverlimit":"off","storageType":"memory","stripUnderscores":"off","systemdFilter":{"enable":true,"filters":[]}},"tail":{"bufferChunkSize":"","bufferMaxSize":"","enable":true,"memBufLimit":"100MB","path":"/var/log/containers/*.log","pauseOnChunksOverlimit":"off","readFromHead":false,"refreshIntervalSeconds":10,"skipEmptyLines":true,"skipLongLines":true,"storageType":"memory"}},"kubeedge":{"enable":false,"prometheusRemoteWrite":{"host":"<cloud-prometheus-service-host>","port":"<cloud-prometheus-service-port>"}},"labels":{},"livenessProbe":{"enabled":true,"failureThreshold":8,"httpGet":{"path":"/","port":2020},"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":15},"logLevel":"","metadata":{"annotations":{}},"namespaceClusterFbCfg":"","namespaceFluentBitCfgSelector":{},"namespaceOverride":"","nodeSelector":{},"output":{"es":{"bufferSize":"20MB","enable":false,"host":"<Elasticsearch url like elasticsearch-logging-data.kubesphere-logging-system.svc>","logstashPrefix":"ks-logstash-log","port":9200,"traceError":true},"kafka":{"brokers":"<kafka broker list like xxx.xxx.xxx.xxx:9092,yyy.yyy.yyy.yyy:9092>","enable":false,"logLevel":"info","topics":"ks-log"},"loki":{"enable":false,"host":"127.0.0.1","httpPassword":"mypass","httpUser":"myuser","logLevel":"info","port":3100,"retryLimit":"no_limits","tenantID":""},"opensearch":{},"opentelemetry":{},"prometheusMetricsExporter":{},"stackdriver":{},"stdout":{"enable":false}},"parsers":{"javaMultiline":{"enable":false}},"podSecurityContext":{},"ports":[],"positionDB":{"hostPath":{"path":"/var/lib/fluent-bit/"}},"priorityClassName":"","rbacRules":{},"resources":{"limits":{"cpu":"500m","memory":"200Mi"},"requests":{"cpu":"10m","memory":"25Mi"}},"schedulerName":"","secrets":[],"securityContext":{},"service":null,"serviceAccountAnnotations":{},"serviceMonitor":{"enable":false,"interval":"30s","metricRelabelings":[],"path":"/api/v2/metrics/prometheus","relabelings":[],"scrapeTimeout":"10s","secure":false,"tlsConfig":{}},"tolerations":[{"operator":"Exists"}]} | Fluent Bit configuration |
| fluentbit.additionalVolumes | list | [] | Additional volumes that can be mounted by containers belonging to the pod |
| fluentbit.additionalVolumesMounts | list | [] | Additional volume mounts to mount into the container's filesystem |
| fluentbit.affinity | object | {"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/edge","operator":"DoesNotExist"}]}]}}} | Affinity configuration for Fluent Bit pods Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity |
| fluentbit.annotations | object | {} | Annotations to add to each Fluent Bit pod Request to Fluent Bit to exclude or not the logs generated by the Pod: fluentbit.io/exclude: "true" Prometheus can use this tag to automatically discover the Pod and collect monitoring data: prometheus.io/scrape: "true" |
| fluentbit.args | list | [] | Custom command line arguments for Fluent Bit containers |
| fluentbit.command | list | [] | Custom command for Fluent Bit containers |
| fluentbit.disableLogVolumes | bool | false | Removes the hostPath mounts for varlibcontainers, varlogs and systemd |
| fluentbit.enable | bool | true | Enable Fluent Bit deployment |
| fluentbit.envVars | list | [] | Environment variables that can be passed to Fluent Bit pods |
| fluentbit.filter | object | {"containerd":{"enable":true},"kubernetes":{"annotations":false,"enable":true,"labels":false},"multiline":{"buffer":false,"emitterMemBufLimit":120,"emitterType":"memory","enable":false,"flushMs":2000,"keyContent":"log","parsers":["go","python","java"]},"systemd":{"enable":true}} | Storage configuration for Fluent Bit buffering storage: path: "/host/fluent-bit-buffer/" backlogMemLimit: "50MB" checksum: "off" deleteIrrecoverableChunks: "on" maxChunksUp: 128 metrics: "on" sync: normal Configure the default filters in FluentBit. The filter will filter and parse the collected log information and output the logs into a uniform format. You can choose whether to turn this on or not. |
| fluentbit.filter.containerd.enable | bool | true | Enable containerd log format converter filter |
| fluentbit.filter.kubernetes.annotations | bool | false | Include Kubernetes annotations in logs |
| fluentbit.filter.kubernetes.enable | bool | true | Enable Kubernetes metadata filter |
| fluentbit.filter.kubernetes.labels | bool | false | Include Kubernetes labels in logs |
| fluentbit.filter.multiline.buffer | bool | false | Buffer for multiline filter |
| fluentbit.filter.multiline.emitterMemBufLimit | int | 120 | Emitter memory buffer limit in MB |
| fluentbit.filter.multiline.emitterType | string | "memory" | Emitter type for multiline filter |
| fluentbit.filter.multiline.enable | bool | false | Enable multiline filter |
| fluentbit.filter.multiline.flushMs | int | 2000 | Flush interval in milliseconds |
| fluentbit.filter.multiline.keyContent | string | "log" | Key content field for multiline filter |
| fluentbit.filter.multiline.parsers | list | ["go","python","java"] | Multiline parsers to use |
| fluentbit.filter.systemd.enable | bool | true | Enable systemd filter |
| fluentbit.hostNetwork | bool | false | Use host network for Fluent Bit DaemonSet |
| fluentbit.image.registry | string | "ghcr.io" | Fluent Bit image registry |
| fluentbit.image.repository | string | "fluent/fluent-operator/fluent-bit" | Fluent Bit image repository |
| fluentbit.image.tag | string | "5.1.5" | Fluent Bit image tag renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit |
| fluentbit.imagePullSecrets | list | [] | Image pull secrets for Fluent Bit Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| fluentbit.initContainers | list | [] | Init containers for Fluent Bit pods Ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ |
| fluentbit.input | object | {"fluentBitMetrics":{},"nodeExporterMetrics":{},"systemd":{"enable":true,"includeKubelet":true,"path":"/var/log/journal","pauseOnChunksOverlimit":"off","storageType":"memory","stripUnderscores":"off","systemdFilter":{"enable":true,"filters":[]}},"tail":{"bufferChunkSize":"","bufferMaxSize":"","enable":true,"memBufLimit":"100MB","path":"/var/log/containers/*.log","pauseOnChunksOverlimit":"off","readFromHead":false,"refreshIntervalSeconds":10,"skipEmptyLines":true,"skipLongLines":true,"storageType":"memory"}} | Configure the format of the config file to either classic or yaml. Default to classic when this value is not set configFileFormat: yaml Set a limit of memory that Tail plugin can use when appending data to the Engine. You can find more details here: https://docs.fluentbit.io/manual/pipeline/inputs/tail#config If the limit is reach, it will be paused; when the data is flushed it resumes. if the inbound traffic is less than 2.4Mbps, setting memBufLimit to 5MB is enough if the inbound traffic is less than 4.0Mbps, setting memBufLimit to 10MB is enough if the inbound traffic is less than 13.64Mbps, setting memBufLimit to 50MB is enough |
| fluentbit.input.fluentBitMetrics | object | {} | Fluent Bit metrics input configuration |
| fluentbit.input.nodeExporterMetrics | object | {} | Node exporter metrics input configuration |
| fluentbit.input.systemd.enable | bool | true | Enable systemd input |
| fluentbit.input.systemd.includeKubelet | bool | true | Include kubelet logs from systemd |
| fluentbit.input.systemd.path | string | "/var/log/journal" | Path to systemd journal |
| fluentbit.input.systemd.pauseOnChunksOverlimit | string | "off" | Pause input when chunks overlimit |
| fluentbit.input.systemd.storageType | string | "memory" | Storage type for systemd input buffering. Use "filesystem" for persistent buffering. |
| fluentbit.input.systemd.stripUnderscores | string | "off" | Strip underscores from systemd field names |
| fluentbit.input.systemd.systemdFilter.enable | bool | true | Enable systemd filter |
| fluentbit.input.systemd.systemdFilter.filters | list | [] | Systemd unit filters |
| fluentbit.input.tail.bufferChunkSize | string | "" | Buffer chunk size for tail input |
| fluentbit.input.tail.bufferMaxSize | string | "" | Buffer max size for tail input |
| fluentbit.input.tail.enable | bool | true | Enable tail input |
| fluentbit.input.tail.memBufLimit | string | "100MB" | Memory buffer limit for tail input |
| fluentbit.input.tail.path | string | "/var/log/containers/*.log" | Path to container logs |
| fluentbit.input.tail.pauseOnChunksOverlimit | string | "off" | Pause input when chunks overlimit |
| fluentbit.input.tail.readFromHead | bool | false | Read from head of log file |
| fluentbit.input.tail.refreshIntervalSeconds | int | 10 | Refresh interval for tail input in seconds |
| fluentbit.input.tail.skipEmptyLines | bool | true | Skip empty lines in logs |
| fluentbit.input.tail.skipLongLines | bool | true | Skip long lines in logs |
| fluentbit.input.tail.storageType | string | "memory" | Storage type for tail input buffering. Use "filesystem" for persistent buffering. |
| fluentbit.kubeedge.enable | bool | false | Enable KubeEdge integration for Fluent Bit |
| fluentbit.kubeedge.prometheusRemoteWrite.host | string | "<cloud-prometheus-service-host>" | Host of a cloud-side Prometheus-compatible server that can receive Prometheus remote write data |
| fluentbit.kubeedge.prometheusRemoteWrite.port | string | "<cloud-prometheus-service-port>" | Port of a cloud-side Prometheus-compatible server that can receive Prometheus remote write data |
| fluentbit.labels | object | {} | Additional custom labels for Fluent Bit pods |
| fluentbit.livenessProbe.enabled | bool | true | Enable liveness probe |
| fluentbit.livenessProbe.failureThreshold | int | 8 | Failure threshold for liveness probe |
| fluentbit.livenessProbe.initialDelaySeconds | int | 10 | Initial delay before liveness probe starts |
| fluentbit.livenessProbe.periodSeconds | int | 10 | Period between liveness probes |
| fluentbit.livenessProbe.successThreshold | int | 1 | Success threshold for liveness probe |
| fluentbit.livenessProbe.timeoutSeconds | int | 15 | Timeout for liveness probe |
| fluentbit.logLevel | string | "" | Log level for Fluent Bit |
| fluentbit.metadata.annotations | object | {} | Allow adding custom annotations to the FluentBit resource's metadata |
| fluentbit.namespaceClusterFbCfg | string | "" | Using namespaceClusterFbCfg, deploy fluent-bit configmap and s |
Deploy fluent-operator with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fluent-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartfluent-operator is pinned at v4.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply