aws-for-fluent-bit

by Helm

Helm chartv0.2.1App 3.2.1

A Helm chart to deploy aws-for-fluent-bit project

About this chart

AWS for fluent bit

A helm chart for AWS-for-fluent-bit

Installing the Chart

Add the EKS repository to Helm:

helm repo add eks https://aws.github.io/eks-charts

Install or upgrading the AWS for fluent bit chart with default configuration:

helm upgrade --install aws-for-fluent-bit --namespace kube-system eks/aws-for-fluent-bit

Uninstalling the Chart

To uninstall/delete the aws-for-fluent-bit release:

helm delete aws-for-fluent-bit --namespace kube-system

Configuration

ParameterDescriptionDefaultRequired
global.namespaceOverrideOverride the deployment namespaceNot set (Release.Namespace)
image.repositoryImage to deployamazon/aws-for-fluent-bit✔
image.tagImage tag to deploystable
image.pullPolicyPull policy for the imageIfNotPresent✔
podSecurityContextSecurity Context for pod{}
containerSecurityContextSecurity Context for container{}
rbac.pspEnabled[DEPRECATED] Whether a pod security policy should be created. PSP was removed in Kubernetes 1.25. See the Kubernetes documentation for migration guidancefalse
imagePullSecretsDocker registry pull secret[]
serviceAccount.createWhether a new service account should be createdtrue
serviceAccount.nameName of the service accountaws-for-fluent-bit
service.extraServiceAppend to existing service with this valueHTTP_Server On HTTP_Listen 0.0.0.0 HTTP_PORT 2020 Health_Check On HC_Errors_Count 5 HC_Retry_Failure_Count 5 HC_Period 5
service.parsersFilesList of available parser files/fluent-bit/parsers/parsers.conf
service.extraParsersAdding more parsers with this value""
input.enabledEnable the tail input to collect kubernetes pod logstrue
input.tagThe tag pattern for pod logskube.*
input.pathPath pattern for pod logs/var/log/containers/*.log
input.dbDB to track file offsets and files read/var/log/flb_kube.db
input.multilineParserSpecify one more or more multiline parsers. Only the first that matches is applied; therefore, use this field to parse docker or cri log format, and then use the multiline filter if additional custom multiline parsing rules need to be applied.docker, cri
input.memBufLimitLimit the buffer memory used by the tail input.5MB
input.skipLongLinesOn means that long lines will be skipped instead of the entire log fileOn
input.refreshIntervalThe interval to refresh the list of watched files in seconds.10
extraInputsAppend to existing input with this value""
additionalInputsAdding more inputs with this value""
filter.*Values for kubernetes filter
filter.extraFiltersAppend to existing filter with value
additionalFiltersAdding more filters with value
luaScriptsOptional map of Lua script filename to content, mounted at /fluent-bit/scripts/{}
cloudWatch.enabledEnable this to activate old golang plugin details. For guidance on choosing go vs c plugin, please refer to debugging guidefalse✔
cloudWatch.matchThe log filter*✔
cloudWatch.regionThe AWS region for CloudWatch.us-east-1✔
cloudWatch.logGroupNameThe name of the CloudWatch Log Group that you want log records sent to."/aws/eks/fluentbit-cloudwatch/logs"✔
cloudWatch.logStreamNameThe name of the CloudWatch Log Stream that you want log records sent to.
cloudWatch.logStreamPrefixPrefix for the Log Stream name. The tag is appended to the prefix to construct the full log stream name. Not compatible with the log_stream_name option."fluentbit-"
cloudWatch.logKeyBy default, the whole log record will be sent to CloudWatch. If you specify a key name with this option, then only the value of that key will be sent to CloudWatch. For example, if you are using the Fluentd Docker log driver, you can specify logKey log and only the log message will be sent to CloudWatch.
cloudWatch.logRetentionDaysIf set to a number greater than zero, and newly create log group's retention policy is set to this many days.
cloudWatch.logFormatAn optional parameter that can be used to tell CloudWatch the format of the data. A value of json/emf enables CloudWatch to extract custom metrics embedded in a JSON payload. See the Embedded Metric Format.
cloudWatch.roleArnARN of an IAM role to assume (for cross account access).
cloudWatch.autoCreateGroupAutomatically create the log group. Valid values are "true" or "false" (case insensitive).true
cloudWatch.endpointSpecify a custom endpoint for the CloudWatch Logs API.
cloudWatch.credentialsEndpointSpecify a custom HTTP endpoint to pull credentials from. more info
cloudWatch.extraOutputsAppend extra outputs with value""
cloudWatchLogs.enabledThis section is used to enable new high performance plugin. The Golang plugin was named cloudwatch; this new high performance CloudWatch plugin is called cloudwatch_logs in fluent bit configuration to prevent conflicts/confusion details. For guidance on choosing go vs c plugin, please refer to debugging guidetrue✔
cloudWatchLogs.matchThe log filter*✔
cloudWatchLogs.regionThe AWS region for CloudWatch.us-east-1✔
cloudWatchLogs.logGroupNameThe name of the CloudWatch Log Group that you want log records sent to."/aws/eks/fluentbit-cloudwatch/logs"✔
cloudWatchLogs.logGroupTemplateTemplate for Log Group name using Fluent Bit record_accessor syntax. This field is optional and if configured it overrides the logGroupName. If the template translation fails, an error is logged and the logGroupName (which is still required) is used instead.
cloudWatchLogs.logStreamNameThe name of the CloudWatch Log Stream that you want log records sent to.
cloudWatchLogs.logStreamPrefixPrefix for the Log Stream name. The tag is appended to the prefix to construct the full log stream name. Not compatible with the log_stream_name option."fluentbit-"
cloudWatchLogs.logStreamTemplateTemplate for Log Stream name using Fluent Bit record_accessor syntax. This field is optional and if configured it overrides the other log stream options. If the template translation fails, an error is logged and the log_stream_name or log_stream_prefix are used instead (and thus one of those fields is still required to be configured).
cloudWatchLogs.logKeyBy default, the whole log record will be sent to CloudWatch. If you specify a key name with this option, then only the value of that key will be sent to CloudWatch. For example, if you are using the Fluentd Docker log driver, you can specify logKey log and only the log message will be sent to CloudWatch. Check the example here.
cloudWatchLogs.logFormatAn optional parameter that can be used to tell CloudWatch the format of the data. A value of json/emf enables CloudWatch to extract custom metrics embedded in a JSON payload. See the Embedded Metric Format.
cloudWatchLogs.roleArnARN of an IAM role to assume (for cross account access).
cloudWatchLogs.autoCreateGroupAutomatically create the log group. Valid values are "true" or "false" (case insensitive).true
cloudWatchLogs.logRetentionDaysIf set to a number greater than zero, and newly create log group's retention policy is set to this many days.
cloudWatchLogs.endpointSpecify a custom endpoint for the CloudWatch Logs API.
cloudWatchLogs.metricNamespaceAn optional string representing the CloudWatch namespace for the metrics. Please refer to tutorial.
cloudWatchLogs.metricDimensionsA list of lists containing the dimension keys that will be applied to all metrics. If you have only one list of dimensions, put the values as a comma separated string. If you want to put list of lists, use the list as semicolon separated strings. Please refer to tutorial.
cloudWatchLogs.stsEndpointSpecify a custom STS endpoint for the AWS STS API.
cloudWatchLogs.autoRetryRequestsImmediately retry failed requests to AWS services once. This option does not affect the normal Fluent Bit retry mechanism with backoff. Instead, it enables an immediate retry with no delay for networking errors, which may help improve throughput when there are transient/random networking issues. This option defaults to true. Please check here for more details
cloudWatchLogs.externalIdSpecify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID.
cloudWatchLogs.extraOutputsAppend extra outputs with value. This section helps you extend current chart implementation with ability to add extra parameters. For example, you can add network config like cloudWatchLogs.extraOutputs.net.dns.mode=TCP.""
firehose.enabledWhether this plugin should be enabled or not, detailsfalse✔
firehose.matchThe log filter"*"✔
firehose.regionThe region which your Firehose delivery stream(s) is/are in."us-east-1"✔
firehose.deliveryStreamThe name of the delivery stream that you want log records sent to."my-stream"✔
firehose.dataKeysBy default, the whole log record will be sent to Kinesis. If you specify a key name(s) with this option, then only those keys and values will be sent to Kinesis. For example, if you are using the Fluentd Docker log driver, you can specify data_keys log and only the log message will be sent to Kinesis. If you specify multiple keys, they should be comma delimited.
firehose.roleArnARN of an IAM role to assume (for cross account access).
firehose.endpointSpecify a custom endpoint for the Kinesis Firehose API.
firehose.timeKeyAdd the timestamp to the record under this key. By default the timestamp from Fluent Bit will not be added to records sent to Kinesis.
firehose.timeKeyFormatstrftime compliant format string for the timestamp; for example, %Y-%m-%dT%H:%M:%S%z. This option is used with time_key.
firehose.extraOutputsAppend extra outputs with value""
kinesis_streams.enabledIt has all the core features of the documentation Golang Fluent Bit plugin released in 2019. The Golang plugin was named kinesis; this new high performance and highly efficient kinesis plugin is called kinesis_streams to prevent conflicts/confusion, detailsfalse✔
kinesis_streams.regionThe AWS region.✔
kinesis_streams.streamThe name of the Kinesis Streams Delivery Stream that you want log records send to.✔
kinesis_streams.endpointSpecify a custom endpoint for the Kinesis Streams API.
kinesis_streams.role_arnARN of an IAM role to assume (for cross account access).
kinesis_streams.sts_endpointCustom endpoint for the STS API.
kinesis_streams.time_keyAdd the timestamp to the record under this key. By default the timestamp from Fluent Bit will not be added to records sent to Kinesis.
kinesis_streams.time_key_formatstrftime compliant format string for the timestamp; for example, the default is %Y-%m-%dT%H:%M:%S. Supports millisecond precision with %3N and supports nanosecond precision with %9N and %L; for example, adding %3N to support millisecond %Y-%m-%dT%H:%M:%S.%3N. This option is used with time_key.
kinesis_streams.log_keyBy default, the whole log record will be sent to Kinesis. If you specify a key name with this opti

Deploy aws-for-fluent-bit with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has aws-for-fluent-bit 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 chartaws-for-fluent-bit is pinned at v0.2.1 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