prometheus-kafka-exporter

by Helm

Helm chartv0.1.3App v1.2.0

Prometheus metrics exporter for Kafka

About this chart

prometheus-kafka-exporter

kafka_exporter is a Prometheus exporter for Kafka metrics.

TL;DR;

$ helm repo add gkarthiks https://gkarthiks.github.io/helm-charts
$ helm install --name kafka-exporter gkarthiks/prometheus-kafka-exporter

Introduction

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

Prerequisites

  • Kubernetes 1.8+ with Beta APIs enabled

Installing the Chart

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

$ helm repo add gkarthiks https://gkarthiks.github.io/helm-charts
$ helm install --name kafka-exporter gkarthiks/prometheus-kafka-exporter

The command deploys prometheus-kafka-exporter on the Kubernetes cluster in the default configuration.

Uninstalling the Chart

To uninstall/delete the kafka-exporter deployment:

$ helm delete kafka-exporter

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

Configuration

The following table lists the configurable parameters and their default values.

ParameterDescriptionDefault
replicaCountdesired number of prometheus-kafka-exporter pods1
image.repositoryprometheus-kafka-exporter image repositorydanielqsj/kafka-exporter
image.tagprometheus-kafka-exporter image taglatest
image.pullPolicyimage pull policyIfNotPresent
resourcescpu/memory resource requests/limits{}
service.typedesired service typeClusterIP
service.portservice external port9308
service.annotationsannotations for service{}
kafkaServerKafka server addresses as an array with port number
annotationspod annotations for easier discovery{}
rbac.createSpecifies whether RBAC resources should be created.true
rbac.pspEnabledSpecifies whether a PodSecurityPolicy should be created.true
serviceAccount.createSpecifies whether a service account should be created.true
serviceAccount.nameName of the service account.``
prometheus.serviceMonitor.enabled.Whether you would like to enable a serviceMonitortrue
prometheus.serviceMonitor.namespace.The namespace to create the serviceMonitor inmonitoring
prometheus.serviceMonitor.intervalInterval at which metrics should be scrapedprometheus-kafka-exporter
prometheus.serviceMonitor.additionalLabels.appAdditional labels to add to the ServiceMonitor{}

For more information please refer to the kafka_exporter documentation.

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

$ helm install --name kafka-exporter \
  --set "replicaCount=1" \
    gkarthiks/prometheus-kafka-exporter

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

$ helm install --name kafka-exporter -f values.yaml gkarthiks/prometheus-kafka-exporter

Deploy prometheus-kafka-exporter with OpenTenant

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