fluent-operator

by Fluent

Helm chartv4.4.0App 3.11.0

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

NameEmailUrl
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

KeyTypeDefaultDescription
KubernetesbooltrueDeploy default Fluent Bit pipeline to collect Kubernetes logs. See https://github.com/fluent/fluent-operator/tree/master/manifests/logging-stack
containerRuntimestring"containerd"Container runtime used by your Kubernetes cluster. Supported values: containerd, crio, docker
fluentbitobject{"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.additionalVolumeslist[]Additional volumes that can be mounted by containers belonging to the pod
fluentbit.additionalVolumesMountslist[]Additional volume mounts to mount into the container's filesystem
fluentbit.affinityobject{"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.annotationsobject{}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.argslist[]Custom command line arguments for Fluent Bit containers
fluentbit.commandlist[]Custom command for Fluent Bit containers
fluentbit.disableLogVolumesboolfalseRemoves the hostPath mounts for varlibcontainers, varlogs and systemd
fluentbit.enablebooltrueEnable Fluent Bit deployment
fluentbit.envVarslist[]Environment variables that can be passed to Fluent Bit pods
fluentbit.filterobject{"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.enablebooltrueEnable containerd log format converter filter
fluentbit.filter.kubernetes.annotationsboolfalseInclude Kubernetes annotations in logs
fluentbit.filter.kubernetes.enablebooltrueEnable Kubernetes metadata filter
fluentbit.filter.kubernetes.labelsboolfalseInclude Kubernetes labels in logs
fluentbit.filter.multiline.bufferboolfalseBuffer for multiline filter
fluentbit.filter.multiline.emitterMemBufLimitint120Emitter memory buffer limit in MB
fluentbit.filter.multiline.emitterTypestring"memory"Emitter type for multiline filter
fluentbit.filter.multiline.enableboolfalseEnable multiline filter
fluentbit.filter.multiline.flushMsint2000Flush interval in milliseconds
fluentbit.filter.multiline.keyContentstring"log"Key content field for multiline filter
fluentbit.filter.multiline.parserslist["go","python","java"]Multiline parsers to use
fluentbit.filter.systemd.enablebooltrueEnable systemd filter
fluentbit.hostNetworkboolfalseUse host network for Fluent Bit DaemonSet
fluentbit.image.registrystring"ghcr.io"Fluent Bit image registry
fluentbit.image.repositorystring"fluent/fluent-operator/fluent-bit"Fluent Bit image repository
fluentbit.image.tagstring"5.1.5"Fluent Bit image tag renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
fluentbit.imagePullSecretslist[]Image pull secrets for Fluent Bit Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
fluentbit.initContainerslist[]Init containers for Fluent Bit pods Ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
fluentbit.inputobject{"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.fluentBitMetricsobject{}Fluent Bit metrics input configuration
fluentbit.input.nodeExporterMetricsobject{}Node exporter metrics input configuration
fluentbit.input.systemd.enablebooltrueEnable systemd input
fluentbit.input.systemd.includeKubeletbooltrueInclude kubelet logs from systemd
fluentbit.input.systemd.pathstring"/var/log/journal"Path to systemd journal
fluentbit.input.systemd.pauseOnChunksOverlimitstring"off"Pause input when chunks overlimit
fluentbit.input.systemd.storageTypestring"memory"Storage type for systemd input buffering. Use "filesystem" for persistent buffering.
fluentbit.input.systemd.stripUnderscoresstring"off"Strip underscores from systemd field names
fluentbit.input.systemd.systemdFilter.enablebooltrueEnable systemd filter
fluentbit.input.systemd.systemdFilter.filterslist[]Systemd unit filters
fluentbit.input.tail.bufferChunkSizestring""Buffer chunk size for tail input
fluentbit.input.tail.bufferMaxSizestring""Buffer max size for tail input
fluentbit.input.tail.enablebooltrueEnable tail input
fluentbit.input.tail.memBufLimitstring"100MB"Memory buffer limit for tail input
fluentbit.input.tail.pathstring"/var/log/containers/*.log"Path to container logs
fluentbit.input.tail.pauseOnChunksOverlimitstring"off"Pause input when chunks overlimit
fluentbit.input.tail.readFromHeadboolfalseRead from head of log file
fluentbit.input.tail.refreshIntervalSecondsint10Refresh interval for tail input in seconds
fluentbit.input.tail.skipEmptyLinesbooltrueSkip empty lines in logs
fluentbit.input.tail.skipLongLinesbooltrueSkip long lines in logs
fluentbit.input.tail.storageTypestring"memory"Storage type for tail input buffering. Use "filesystem" for persistent buffering.
fluentbit.kubeedge.enableboolfalseEnable KubeEdge integration for Fluent Bit
fluentbit.kubeedge.prometheusRemoteWrite.hoststring"<cloud-prometheus-service-host>"Host of a cloud-side Prometheus-compatible server that can receive Prometheus remote write data
fluentbit.kubeedge.prometheusRemoteWrite.portstring"<cloud-prometheus-service-port>"Port of a cloud-side Prometheus-compatible server that can receive Prometheus remote write data
fluentbit.labelsobject{}Additional custom labels for Fluent Bit pods
fluentbit.livenessProbe.enabledbooltrueEnable liveness probe
fluentbit.livenessProbe.failureThresholdint8Failure threshold for liveness probe
fluentbit.livenessProbe.initialDelaySecondsint10Initial delay before liveness probe starts
fluentbit.livenessProbe.periodSecondsint10Period between liveness probes
fluentbit.livenessProbe.successThresholdint1Success threshold for liveness probe
fluentbit.livenessProbe.timeoutSecondsint15Timeout for liveness probe
fluentbit.logLevelstring""Log level for Fluent Bit
fluentbit.metadata.annotationsobject{}Allow adding custom annotations to the FluentBit resource's metadata
fluentbit.namespaceClusterFbCfgstring""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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartfluent-operator is pinned at v4.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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