fluentd
by [riftbit]
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.runAsUserto0(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
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template | "" |
clusterDomain | Cluster Domain | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
Fluentd parameters
| Name | Description | Value |
|---|---|---|
image.registry | Fluentd image registry | docker.io |
image.repository | Fluentd image repository | bitnami/fluentd |
image.tag | Fluentd image tag (immutable tags are recommended) | 1.14.0-debian-10-r9 |
image.pullPolicy | Fluentd image pull policy | IfNotPresent |
image.pullSecrets | Fluentd image pull secrets | [] |
image.debug | Enable image debug mode | false |
forwarder.enabled | Enable forwarder daemonset | true |
forwarder.daemonUser | Forwarder daemon user and group (set to root by default because it reads from host paths) | root |
forwarder.daemonGroup | Fluentd forwarder daemon system group | root |
forwarder.hostAliases | Add deployment host aliases | [] |
forwarder.securityContext.enabled | Enable security context for forwarder pods | true |
forwarder.securityContext.runAsUser | User ID for forwarder's containers | 0 |
forwarder.securityContext.runAsGroup | Group ID for forwarder's containers | 0 |
forwarder.securityContext.fsGroup | Group ID for forwarder's containers filesystem | 0 |
forwarder.containerSecurityContext.enabled | Enable security context for the forwarder container | true |
forwarder.containerSecurityContext.privileged | Run as privileged | false |
forwarder.containerSecurityContext.allowPrivilegeEscalation | Allow Privilege Escalation | false |
forwarder.containerSecurityContext.readOnlyRootFilesystem | Require the use of a read only root file system | false |
forwarder.containerSecurityContext.capabilities.drop | Drop capabilities for the securityContext | [] |
forwarder.terminationGracePeriodSeconds | Duration in seconds the pod needs to terminate gracefully | 30 |
forwarder.configFile | Name of the config file that will be used by Fluentd at launch under the /opt/bitnami/fluentd/conf directory | fluentd.conf |
forwarder.configMap | Name of the config map that contains the Fluentd configuration files | "" |
forwarder.configMapFiles | Files to be added to be config map. Ignored if forwarder.configMap is set | {} |
forwarder.extraArgs | Extra arguments for the Fluentd command line | "" |
forwarder.extraEnv | Extra environment variables to pass to the container | [] |
forwarder.containerPorts | Ports the forwarder containers will listen on | [] |
forwarder.service.type | Kubernetes service type (ClusterIP, NodePort, or LoadBalancer) for the forwarders | ClusterIP |
forwarder.service.ports | Array containing the forwarder service ports | {} |
forwarder.service.loadBalancerIP | loadBalancerIP if service type is LoadBalancer (optional, cloud specific) | "" |
forwarder.service.loadBalancerSourceRanges | Addresses that are allowed when service is LoadBalancer | [] |
forwarder.service.clusterIP | Static clusterIP or None for headless services | "" |
forwarder.service.annotations | Provide any additional annotations which may be required | {} |
forwarder.livenessProbe.enabled | Enable livenessProbe | true |
forwarder.livenessProbe.httpGet.path | Request path for livenessProbe | /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D |
forwarder.livenessProbe.httpGet.port | Port for livenessProbe | http |
forwarder.livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 60 |
forwarder.livenessProbe.periodSeconds | Period seconds for livenessProbe | 10 |
forwarder.livenessProbe.timeoutSeconds | Timeout seconds for livenessProbe | 5 |
forwarder.livenessProbe.failureThreshold | Failure threshold for livenessProbe | 6 |
forwarder.livenessProbe.successThreshold | Success threshold for livenessProbe | 1 |
forwarder.readinessProbe.enabled | Enable readinessProbe | true |
| `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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartfluentd is pinned at v4.2.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