fluentd

by [riftbit]

Helm chartv4.2.0App 1.14.0Verified publisher

Fluentd is an open source data collector for unified logging layer

About this chart

Fluentd

Fluentd is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data.

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/fluentd

Introduction

This chart bootstraps a Fluentd deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.1.0
  • PV provisioner support in the underlying infrastructure

Note: Please, note that the forwarder runs the container as root by default setting the forwarder.securityContext.runAsUser to 0 (root user)

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/fluentd

These commands deploy Fluentd on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release resources:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option --purge to delete all history too.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
clusterDomainCluster Domaincluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

Fluentd parameters

NameDescriptionValue
image.registryFluentd image registrydocker.io
image.repositoryFluentd image repositorybitnami/fluentd
image.tagFluentd image tag (immutable tags are recommended)1.14.0-debian-10-r9
image.pullPolicyFluentd image pull policyIfNotPresent
image.pullSecretsFluentd image pull secrets[]
image.debugEnable image debug modefalse
forwarder.enabledEnable forwarder daemonsettrue
forwarder.daemonUserForwarder daemon user and group (set to root by default because it reads from host paths)root
forwarder.daemonGroupFluentd forwarder daemon system grouproot
forwarder.hostAliasesAdd deployment host aliases[]
forwarder.securityContext.enabledEnable security context for forwarder podstrue
forwarder.securityContext.runAsUserUser ID for forwarder's containers0
forwarder.securityContext.runAsGroupGroup ID for forwarder's containers0
forwarder.securityContext.fsGroupGroup ID for forwarder's containers filesystem0
forwarder.containerSecurityContext.enabledEnable security context for the forwarder containertrue
forwarder.containerSecurityContext.privilegedRun as privilegedfalse
forwarder.containerSecurityContext.allowPrivilegeEscalationAllow Privilege Escalationfalse
forwarder.containerSecurityContext.readOnlyRootFilesystemRequire the use of a read only root file systemfalse
forwarder.containerSecurityContext.capabilities.dropDrop capabilities for the securityContext[]
forwarder.terminationGracePeriodSecondsDuration in seconds the pod needs to terminate gracefully30
forwarder.configFileName of the config file that will be used by Fluentd at launch under the /opt/bitnami/fluentd/conf directoryfluentd.conf
forwarder.configMapName of the config map that contains the Fluentd configuration files""
forwarder.configMapFilesFiles to be added to be config map. Ignored if forwarder.configMap is set{}
forwarder.extraArgsExtra arguments for the Fluentd command line""
forwarder.extraEnvExtra environment variables to pass to the container[]
forwarder.containerPortsPorts the forwarder containers will listen on[]
forwarder.service.typeKubernetes service type (ClusterIP, NodePort, or LoadBalancer) for the forwardersClusterIP
forwarder.service.portsArray containing the forwarder service ports{}
forwarder.service.loadBalancerIPloadBalancerIP if service type is LoadBalancer (optional, cloud specific)""
forwarder.service.loadBalancerSourceRangesAddresses that are allowed when service is LoadBalancer[]
forwarder.service.clusterIPStatic clusterIP or None for headless services""
forwarder.service.annotationsProvide any additional annotations which may be required{}
forwarder.livenessProbe.enabledEnable livenessProbetrue
forwarder.livenessProbe.httpGet.pathRequest path for livenessProbe/fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
forwarder.livenessProbe.httpGet.portPort for livenessProbehttp
forwarder.livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe60
forwarder.livenessProbe.periodSecondsPeriod seconds for livenessProbe10
forwarder.livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
forwarder.livenessProbe.failureThresholdFailure threshold for livenessProbe6
forwarder.livenessProbe.successThresholdSuccess threshold for livenessProbe1
forwarder.readinessProbe.enabledEnable readinessProbetrue
`forwarder.readinessProbe.h

Deploy fluentd with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fluentd 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 chartfluentd is pinned at v4.2.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