kapacitor

by Helm

Helm chartv1.4.7App 1.6.4

InfluxDB's native data processing engine. It can process both stream and batch data from InfluxDB.

About this chart

Kapacitor Helm chart

Kapacitor is an open-source framework used for processing, monitoring, and alerting on time series data.

The Kapacitor Helm chart uses the Helm package manager to bootstrap a Kapacitor deployment and service on a Kubernetes cluster.

Prerequisites

  • Helm v2 or later
  • Kubernetes 1.4+
  • PersistentVolume (PV) provisioner support in the underlying infrastructure (optional)

Install the chart

  1. Add the InfluxData Helm repository:

    helm repo add influxdata https://helm.influxdata.com/
    
  2. Run the following command, providing a name for your release:

    helm upgrade --install my-release influxdata/kapacitor
    

    Tip: --install can be shortened to -i.

    This command deploys Kapacitor on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see Configure the chart.

    Tip: To view all Helm chart releases, run helm list.

Uninstall the chart

To uninstall the my-release deployment, use the following command:

helm uninstall my-release

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

Configure the chart

The following table lists configurable parameters, their descriptions, and their default values stored in values.yaml.

ParameterDescriptionDefault
image.repositoryimage repository urlKapacitor image
image.tagKapacitor image version1.6.4-alpine
image.pullPolicyKapacitor image pull policyIfNotPresent
strategyKapacitor deployment strategy config
service.typeKapacitor web service typeClusterIP
persistence.enabledEnable Kapacitor persistence using Persistent Volume Claimsfalse
persistence.storageClassKapacitor Persistent Volume Storage Classdefault
persistence.accessModeKapacitor Persistent Volume Access ModeReadWriteOnce
persistence.sizeKapacitor Persistent Volume Storage Size8Gi
persistence.existingClaimKapacitor existing PVC namenil
resources.request.memoryKapacitor memory request256Mi
resources.request.cpuKapacitor cpu request0.1
resources.limits.memoryKapacitor memory limit2Gi
resources.limits.cpuKapacitor cpu limit2
envVarsEnvironment variables to set initial Kapacitor configuration (https://hub.docker.com/_/kapacitor/){}
influxURLInfluxDB url used to interact with Kapacitorhttp://influxdb-influxdb.tick:8086
existingSecretName of an existing Secrect used to set the environment variables for the InfluxDB user and password. The expected keys in the secret are influxdb-user and influxdb-password.
rbac.createCreate and use RBAC resourcestrue
rbac.namespacedCreates Role and Rolebinding instead of the default ClusterRole and ClusteRoleBindings for the Kapacitor instancefalse
serviceAccount.annotationsServiceAccount annotations{}
serviceAccount.createCreate service accounttrue
serviceAccount.nameService account name to use, when empty will be set to created account if serviceAccount.create is set else to default
sidecar.imageSidecar imagekiwigrid/k8s-sidecar:0.1.116
sidecar.imagePullPolicySidecar image pull policyIfNotPresent
sidecar.resourcesSidecar resources{}
sidecar.skipTlsVerifySet to true to skip tls verification for kube api callsnil
sidecar.sideload.enabledEnables the search for sideloads and adds/updates/deletes them in Kapacitorfalse
sidecar.sideload.labelLabel that configmaps with sideloads should have to be addedkapacitor_sideload
sidecar.sideload.searchNamespaceIf specified, the sidecar will search for sideload configmaps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespacesnil
sidecar.sideload.folderFolder in the pod that should hold the collected sideloads. This path will be mounted./var/lib/kapacitor/sideload
namespaceOverrideOverride the deployment namespace"" (Release.Namespace)

To configure the chart, do either of the following:

  • Specify each parameter using the --set key=value[,key=value] argument to helm upgrade --install. For example, use the following command:

    helm upgrade --install my-release \
    --set influxURL=http://myinflux.mytld:8086,persistence.enabled=true \
      influxdata/kapacitor
    

    This command enables persistence.

  • Provide a YAML file that specifies parameter values while installing the chart. For example, use the following command:

    helm upgrade --install my-release -f values.yaml influxdata/kapacitor
    

    Tip: Use the default values.yaml.

For information about running Kapacitor in Docker, see the full image documentation.

Persistence

The Kapacitor image stores data in the /var/lib/kapacitor directory in the container.

The chart optionally mounts a Persistent Volume at this location. The volume is created using dynamic volume provisioning.

Sidecar for sideloads

If the parameter sidecar.sideload.enabled is set, a sidecar container is deployed in the Kapacitor pod. This container watches all configmaps in the cluster and filters out the ones with a label as defined in sidecar.sideload.label. The files defined in those configmaps are written to a folder and can be accessed by TICKscripts. Changes to the configmaps are monitored and the files are deleted/updated.

Example sideload config:

apiVersion: v1
kind: ConfigMap
metadata:
  name: kapacitor-sideload-influxdb-httpd-clienterror
  labels:
    kapacitor_sideload: "1"
data:
  influxdb-httpd-clienterror.yml: |
    [...]

Check out our Slack channel for support and information.

Deploy kapacitor with OpenTenant

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