Kafka

Kafka Plugin

The Kafka plugin sets up an Apache Kafka environment using the Strimzi Kafka Operator, automating deployment, provisioning, management, and orchestration of Kafka clusters with KRaft mode (without ZooKeeper).

Overview

Apache Kafka is a distributed event streaming platform designed for high-throughput, fault-tolerant, real-time data processing. The Strimzi Kafka Operator simplifies the management of Kafka clusters on Kubernetes.

Components included in this Plugin:

  • Strimzi Kafka Operator
  • Apache Kafka Cluster Management (KRaft mode)
  • Kafka Exporter for Metrics (optional)
  • Cruise Control for Cluster Optimization (optional)
  • Entity Operator for Topic and User Management

Note

More configurations will be added over time, and contributions of custom configurations are highly appreciated. If you discover bugs or want to add functionality to the plugin, feel free to create a pull request.

Quick Start

Prerequisites

  • A running and Greenhouse-onboarded Kubernetes cluster.
  • Sufficient cluster resources for running Kafka (minimum 3 nodes recommended for production).
  • Prometheus Operator installed if you want to enable monitoring (recommended).

Installation

  1. Navigate to the Greenhouse Dashboard.
  2. Select the Kafka plugin from the catalog.
  3. Specify the target cluster and configuration options.

Values

KeyTypeDefaultDescription
commonLabelsobject{}common labels to apply to all resources.
cruiseControl.enabledboolfalseEnable Cruise Control
cruiseControl.resourcesobjectrequests: 512Mi memory, 500m CPU; limits: 1Gi memory, 1 CPUCruise Control resource configuration
entityOperator.enabledbooltrueEnable Entity Operator
entityOperator.topicOperatorobjectrequests: 128Mi memory, 100m CPU; limits: 256Mi memory, 200m CPUTopic Operator resource configuration
entityOperator.userOperatorobjectrequests: 128Mi memory, 100m CPU; limits: 256Mi memory, 200m CPUUser Operator resource configuration
kafka.configobjectSee values.yaml for production defaultsKafka broker configuration
kafka.enabledbooltrueEnable or disable Kafka cluster deployment
kafka.jvmOptionsobjectxms: 1024m, xmx: 2048mJVM heap settings for Kafka brokers. xms (initial heap) and xmx (max heap): Heap should be kept modest to preserve memory for OS page cache, which Kafka relies on heavily for performance. See: https://docs.confluent.io/platform/current/kafka/deployment.html
kafka.listenerslistplaintext on 9092, TLS on 9093Listener configuration
kafka.metricsEnabledbooltrueEnable metrics
kafka.namestring"kafka"Name of the Kafka cluster
kafka.replicasint3Number of Kafka broker/controller replicas (for KRaft mode)
kafka.resourcesobjectrequests: 2Gi memory, 1 CPU; limits: 4Gi memory, 2 CPUResource configuration for Kafka brokers
kafka.storageobjectJBOD with 100Gi persistent volume per brokerStorage configuration for Kafka brokers
kafka.versionstring"4.1.0"Kafka version
kafkaExporter.enabledboolfalseEnable Kafka Exporter
kafkaExporter.groupRegexstring".*"Consumer group regex for metrics export
kafkaExporter.resourcesobjectrequests: 128Mi memory, 100m CPU; limits: 256Mi memory, 200m CPUKafka Exporter resource configuration
kafkaExporter.topicRegexstring".*"Topic regex for metrics export
monitoring.additionalRuleLabelsobject{}Additional labels for PrometheusRule alerts
monitoring.enabledbooltrueEnable Prometheus monitoring
operator.enabledbooltrueEnable or disable the Strimzi Kafka Operator installation
testFramework.enabledbooltrueActivates the Helm chart testing framework.
testFramework.imageobjectghcr.io/cloudoperators/greenhouse-extensions-integration-test:mainTest framework image configuration
testFramework.image.pullPolicystring"Always"Defines the image pull policy for the test framework.
testFramework.image.registrystring"ghcr.io"Defines the image registry for the test framework.
testFramework.image.repositorystring"cloudoperators/greenhouse-extensions-integration-test"Defines the image repository for the test framework.
testFramework.image.tagstring"main"Defines the image tag for the test framework.
topics.audit.cleanupPolicystring"delete"Cleanup policy
topics.audit.compressionTypestring"producer"Compression type
topics.audit.enabledbooltrueEnable this topic
topics.audit.maxMessageBytesint1048576Max message size (1 MB)
topics.audit.minInsyncReplicasint2Min in-sync replicas
topics.audit.partitionsint3Number of partitions (should match OpenSearch index shards)
topics.audit.replicasint3Replication factor
topics.audit.retentionint86400000Retention period (24 hours = 86400000 ms)
topics.audit.segmentBytesint1073741824Segment size (1 GB)
topics.logs.cleanupPolicystring"delete"Cleanup policy
topics.logs.compressionTypestring"producer"Compression type
topics.logs.enabledbooltrueEnable this topic
topics.logs.maxMessageBytesint1048576Max message size (1 MB)
topics.logs.minInsyncReplicasint2Min in-sync replicas
topics.logs.partitionsint3Number of partitions (should match OpenSearch index shards)
topics.logs.replicasint3Replication factor
topics.logs.retentionint86400000Retention period (24 hours = 86400000 ms)
topics.logs.segmentBytesint1073741824Segment size (1 GB)