fluentd-cloudwatch

by joaquinito2051

Helm chartv0.9.0App v1.3.3-debian-cloudwatch-1.0

A Fluentd CloudWatch Helm chart for Kubernetes.

About this chart

Fluentd CloudWatch

TL;DR;

$ helm install <helm-repo>/fluentd-cloudwatch

$ helm install incubator/fluentd-cloudwatch

Introduction

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

Prerequisites

  • Kubernetes 1.4+ with Beta APIs enabled
  • kube2iam installed to used the awsRole config option

Installing the Chart

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

$ # use ec2 instance role credential
$ helm install --name my-release <helm-repo>/fluentd-cloudwatch
$ # or add aws_access_key_id and aws_access_key_id with the key/password of a AWS user with a policy to access  Cloudwatch
$ helm install --name my-release <helm-repo>/fluentd-cloudwatch --set awsAccessKeyId=aws_access_key_id_here --set awsSecretAccessKey=aws_secret_access_key_here
$ helm install --name my-release incubator/fluentd-cloudwatch
$ # or add a role to aws with the correct policy to add to cloud watch
$ helm install --name my-release <helm-repo>/fluentd-cloudwatch --set awsRole=roll_name_here

$ helm install --name my-release incubator/fluentd-cloudwatch --set awsRole=roll_name_here The command deploys Fluentd Cloudwatch on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Fluentd Cloudwatch chart and their default values.

ParameterDescriptionDefault
image.repositoryImage repositoryfluent/fluentd-kubernetes-daemonset
image.tagImage tagv1.3.3-debian-cloudwatch-1.0
image.pullPolicyImage pull policyIfNotPresent
resources.limits.cpuCPU limit100m
resources.limits.memoryMemory limit200Mi
resources.requests.cpuCPU request100m
resources.requests.memoryMemory request200Mi
hostNetworkHost networkfalse
podAnnotationsAnnotations{}
podSecurityContextSecurity Context{}
awsRegionAWS Cloudwatch regionus-east-1
awsRoleAWS IAM Role To Usenil
awsAccessKeyIdAWS Access Key Id of a AWS user with a policy to access Cloudwatchnil
awsSecretAccessKeyAWS Secret Access Key of a AWS user with a policy to access Cloudwatchnil
fluentdConfigFluentd configurationexample configuration
logGroupNameAWS Cloudwatch log groupkubernetes
rbac.createIf true, create & use RBAC resourcesfalse
rbac.serviceAccountNameexisting ServiceAccount to use (ignored if rbac.create=true)default
tolerationsAdd tolerations[]
extraVarsAdd pod environment variables (must be specified as a single line object)[]
updateStrategyDefine daemonset update strategyOnDelete
nodeSelectorNode labels for pod assignment{}
affinityNode affinity for pod assignment{}

If using fluentd-kubernetes-daemonset v0.12.43-cloudwatch, the container runs as user fluentd. To be able to write pos files to the host system, you'll need to run fluentd as root. Add the following extraVars value to run as root.

"{ name: FLUENT_UID, value: '0' }"

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
  --set awsRegion=us-east-1 \
    <helm-repo>/fluentd-cloudwatch
$ helm install --name my-release \

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml <helm-repo>/fluentd-cloudwatch

Deploy fluentd-cloudwatch with OpenTenant

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