Strimzi provides a way to run Apache Kafka® clusters on Kubernetes and OpenShift using the Operator pattern. It simplifies the deployment and management of Kafka clusters, including topics, users, connectors, and more.
See README.md for project overview, quick starts, and community information.
Multi-module Maven project.
- Java: Java 21
- Build tools: Maven 3.5+, make, bash
- Helm: Helm 3 (for Helm chart packaging and testing)
- Container runtime: Docker or Podman (use
DOCKER_CMD=podmanfor Podman) - Kubernetes cluster: Required for integration/system tests (minikube, kind, or remote cluster)
- Kafka client and Fabric8 Kubernetes client versions: See
pom.xml - Supported Kafka versions (for cluster deployment): See
kafka-versions.yaml
| Module | Purpose |
|---|---|
cluster-operator/ |
Main operator managing Kafka clusters |
topic-operator/ |
Manages Kafka topics via KafkaTopic CRs |
user-operator/ |
Manages Kafka users and ACLs via KafkaUser CRs |
api/ |
CRD definitions and API models (Kafka, KafkaTopic, KafkaUser, etc.) |
operator-common/ |
Shared operator code and utilities |
kafka-agent/ |
Java agent running inside Kafka containers (broker config, metrics) |
tracing-agent/ |
OpenTelemetry tracing support |
certificate-manager/ |
TLS certificate management and CA handling |
kafka-init/ |
Kafka container initialization logic |
crd-generator/ |
Generates CRDs from api module via Java annotations |
crd-annotations/ |
Annotations for CRD generation |
config-model/ |
Kafka configuration models utility classes |
config-model-generator/ |
Generates Kafka configuration models |
v1-api-conversion/ |
Conversion tool from v1beta2 to v1 CRDs |
mockkube/ |
Mock Kubernetes for unit testing |
test/ |
Test utilities and helpers |
systemtest/ |
End-to-end system tests |
-
Commit sign-off (DCO) (REQUIRED on all commits): always use
git commit -s- If forgotten:
git commit --amend -sto fix last commit - CI will fail without sign-off
- More info: CONTRIBUTING.md
- If forgotten:
-
Code style: Enforced by checkstyle (runs in CI on all PRs)
- Config:
.checkstyle/checkstyle.xml - Run locally:
mvn checkstyle:check - CI will fail if checkstyle errors are found
- Config:
Building:
- Build project:
make all(compiles Java, runs tests, builds Docker images) - Clean build artifacts:
make clean - Customize Maven behavior: Use
MVN_ARGSenvironment variable- Skip all tests:
MVN_ARGS=-DskipTests make all - Skip integration tests only:
MVN_ARGS=-DskipITs make all
- Skip all tests:
- Build specific module: Run
make allormake cleanfrom module directory (MVN_ARGSworks here too)
Testing:
- Unit tests only:
mvn test - Unit + integration tests:
mvn verify - System tests (requires Kubernetes cluster): see TESTING.md
CRD Changes: If you changed anything in the api/ module:
- Run
make allin theapi/module to update generated files - Run
make crd_installto update derived CRDs in:api/src/test/resources/crds/packaging/install/cluster-operator/packaging/helm-charts/helm3/strimzi-kafka-operator/crds/
Generated Code (Never edit directly):
- Sundrio builders/fluent classes (generated from annotations)
- Config Model JSONs (generated from Kafka source)
- Files in
target/directories or marked@Generated
Container Images:
- Built via
docker-images/Makefiles - Base images in
docker-images/base/ - Use
DOCKER_CMD=podmanto use Podman instead of Docker - Environment variables for custom registry:
DOCKER_ORG: your registry organization/username (e.g., Docker Hub or Quay.io username, default:$USER)DOCKER_REGISTRY: registry to use (e.g.,docker.io,quay.io, default:docker.io)DOCKER_TAG: image tag (default:latest)DOCKER_ARCHITECTURE: target architecture for container images (e.g.,amd64,arm64)
User-facing documentation is in documentation/ folder (AsciiDoc format):
- Overview guide: Key concepts and features
- Deploying and Managing guide: Deployment instructions and best practices
- API Reference: Detailed configuration reference
For contributing to documentation, see the documentation related README.md.