### Example Configuration File Structure Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/con-config-examples.adoc The release artifacts include an 'examples' directory containing configuration examples for various Strimzi components. These examples can be used as a starting point for your own deployments. ```text examples ├── user <1> ├── topic <2> ├── security <3> │ ├── tls-auth │ ├── scram-sha-512-auth │ └── keycloak-authorization ├── mirror-maker <4> ├── metrics <5> ├── kafka <6> ├── cruise-control <7> ├── connect <8> └── bridge <9> ``` -------------------------------- ### Install Strimzi Kafka Operator with Custom Replicas Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/helm-charts/helm3/strimzi-kafka-operator/README.md Example of installing the Strimzi Kafka Operator Helm chart and setting the number of replicas to 2. ```bash helm install my-strimzi-cluster-operator --set replicas=2 oci://quay.io/strimzi-helm/strimzi-kafka-operator ``` -------------------------------- ### Example PV output Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/managing/proc-cluster-recovery-volume.adoc This is an example output of the `kubectl get pv` command, showing PV names, reclaim policies, and claims. ```shell NAME RECLAIMPOLICY CLAIM pvc-5e9c5c7f-3317-11ea-a650-06e1eadd9a4c ... Retain ... myproject/data-0-my-cluster-broker-0 pvc-5e9cc72d-3317-11ea-97b0-0aef8816c7ea ... Retain ... myproject/data-0-my-cluster-broker-1 pvc-5ead43d1-3317-11ea-97b0-0aef8816c7ea ... Retain ... myproject/data-0-my-cluster-broker-2 pvc-7e1f67f9-3317-11ea-a650-06e1eadd9a4c ... Retain ... myproject/data-0-my-cluster-controller-3 pvc-7e21042e-3317-11ea-9786-02deaf9aa87e ... Retain ... myproject/data-0-my-cluster-controller-4 pvc-7e226978-3317-11ea-97b0-0aef8816c7ea ... Retain ... myproject/data-0-my-cluster-controller-5 ``` -------------------------------- ### Example source connector configuration Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/con-config-kafka-connector.adoc Defines a source connector configuration, including the maximum number of tasks and how it interacts with external data systems. This example demonstrates a basic setup for a source connector. ```yaml apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaConnector metadata: name: my-source-connector spec: class: org.apache.kafka.connect.file.FileStreamSourceConnector tasksMax: 2 config: file: /path/to/your/input.txt topic: my-topic ``` -------------------------------- ### Broker Certificates Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/security/proc-accessing-kafka-using-ingress.adoc Example output showing the certificate chain for a Kafka broker, useful for verifying TLS setup. ```shell Certificate chain 0 s:O = io.strimzi, CN = my-cluster-kafka i:O = io.strimzi, CN = cluster-ca v0 ``` -------------------------------- ### Build a Single Guide with Asciidoctor Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/contributing/make-tooling.adoc Use the `asciidoctor` command to build a specific guide locally. Specify the path to the source `.adoc` file. ```shell asciidoctor ``` -------------------------------- ### Kafka Connect pod status output example Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-kafka-connect.adoc Example output showing a running Kafka Connect pod. The deployment is successful when the STATUS is 'Running'. ```shell NAME READY STATUS RESTARTS my-connect-cluster-connect- 1/1 Running 0 ``` -------------------------------- ### Kafka pod status output example Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-managing-storage-node-pools.adoc Example output showing three Kafka nodes in a node pool that are running and ready. ```shell NAME READY STATUS RESTARTS my-cluster-pool-a-0 1/1 Running 0 my-cluster-pool-a-1 1/1 Running 0 my-cluster-pool-a-2 1/1 Running 0 ``` -------------------------------- ### Example KafkaConnector configuration Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploying-kafkaconnector.adoc This is an example configuration for a FileStreamSourceConnector, used to create a KafkaConnector resource. ```yaml apiVersion: {KafkaConnectorApiVersion} kind: KafkaConnector metadata: name: my-source-connector labels: strimzi.io/cluster: my-connect spec: class: org.apache.kafka.connect.file.FileStreamSourceConnector tasksMax: 1 config: file: "/kafka/licenses/licenses.txt" topic: my-topic ``` -------------------------------- ### HTTP Bridge Pod Status Example Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-http-bridge.adoc Example output showing a running HTTP Bridge pod. The deployment is successful when the STATUS is Running. ```shell NAME READY STATUS RESTARTS my-bridge-bridge- 1/1 Running 0 ``` -------------------------------- ### Example plugins file structure Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-kafka-connect-new-image-from-base.adoc This example shows the directory structure for Debezium connector plugins (MongoDB, MySQL, PostgreSQL) that can be copied into the Kafka Connect image. Only essential files are listed for brevity. ```tree $ tree ./_my-plugins_/ ./_my-plugins_/ ├── debezium-connector-mongodb │   ├── bson-.jar │   ├── CHANGELOG.md │   ├── CONTRIBUTE.md │   ├── COPYRIGHT.txt │   ├── debezium-connector-mongodb-.jar │   ├── debezium-core-.jar │   ├── LICENSE.txt │   ├── mongodb-driver-core-.jar │   ├── README.md │   └── # ... ├── debezium-connector-mysql │   ├── CHANGELOG.md │   ├── CONTRIBUTE.md │   ├── COPYRIGHT.txt │   ├── debezium-connector-mysql-.jar │   ├── debezium-core-.jar │   ├── LICENSE.txt │   ├── mysql-binlog-connector-java-.jar │   ├── mysql-connector-java-.jar │   ├── README.md │   └── # ... └── debezium-connector-postgres ├── CHANGELOG.md ├── CONTRIBUTE.md ├── COPYRIGHT.txt ├── debezium-connector-postgres-.jar ├── debezium-core-.jar ├── LICENSE.txt ├── postgresql-.jar ├── protobuf-java-.jar    ├── README.md └── # ... ``` -------------------------------- ### Example Topic Operator Configuration Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/con-configuring-topic-operator.adoc Use this example to configure the Topic Operator's watched namespace, reconciliation interval, and resource requests/limits. ```yaml apiVersion: {KafkaApiVersion} kind: Kafka metadata: name: my-cluster spec: kafka: # ... entityOperator: # ... topicOperator: watchedNamespace: my-topic-namespace reconciliationIntervalMs: 60000 resources: requests: cpu: "1" memory: 500Mi limits: cpu: "1" memory: 500Mi # ... ---- ``` -------------------------------- ### Install Testing Farm CLI Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/systemtest/tmt/README.md Install the Testing Farm command-line tool to trigger test plans in the testing farm. ```bash pip install tft-cli ``` -------------------------------- ### Example mTLS Configuration Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-user-operator-standalone.adoc This example demonstrates how to configure mTLS authentication for connecting to the Kafka cluster. It specifies the secrets used for authentication. ```shell kubectl create secret generic user-operator-certs \ --from-file=ca.key=path/to/ca.key \ --from-file=ca.crt=path/to/ca.crt \ --from-file=user.crt=path/to/user.crt \ --from-file=user.key=path/to/user.key ``` -------------------------------- ### Install Git on Fedora Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/contributing/git-setup-guide.adoc Use yum for Fedora 21 and earlier, and dnf for Fedora 22 and later to install Git. ```bash $ yum install git (up to Fedora 21) $ dnf install git (Fedora 22 and later) ``` -------------------------------- ### KafkaNodePool Resource Configuration Example Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/con-common-configuration-properties.adoc Example YAML configuration for a KafkaNodePool resource, specifying replicas, roles, and resource requests/limits for brokers. ```yaml apiVersion: {KafkaNodePoolApiVersion} kind: KafkaNodePool metadata: name: pool-a labels: strimzi.io.cluster: my-cluster spec: replicas: 3 roles: - broker resources: requests: memory: 64Gi cpu: "8" limits: memory: 64Gi cpu: "12" # ... ``` -------------------------------- ### Install TMT Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/systemtest/tmt/README.md Install the Test Management Tool (TMT) with all optional dependencies for linting and checking test plans. ```bash pip install tmt[all] ``` -------------------------------- ### Install Helm Unittest Plugin Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/DEV_GUIDE.md Installs the helm-unittest plugin, which is used for running unit tests for Helm charts. ```bash helm plugin install https://github.com/helm-unittest/helm-unittest.git ``` -------------------------------- ### Install Strimzi Drain Cleaner with Specific Version and Replicas Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/drain-cleaner/proc-drain-cleaner-deploying-helm-chart.adoc Install a specific version of the Drain Cleaner and set the number of replicas using the `--set` argument. ```shell helm install strimzi-drain-cleaner --set replicaCount=2 --version {DrainCleanerVersion} oci://quay.io/strimzi-helm/strimzi-drain-cleaner ``` -------------------------------- ### Install Strimzi Kafka Operator Helm Chart Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/DEV_GUIDE.md Installs the Strimzi Kafka Operator Helm chart directly from its source directory. ```bash helm install strimzi-operator packaging/helm-charts/helm3/strimzi-kafka-operator ``` -------------------------------- ### Example Helm secret configuration Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/drain-cleaner/proc-drain-cleaner-certs.adoc Example configuration for `values.yaml` in a Helm deployment, enabling secret creation and providing the base64-encoded certificates. ```yaml # ... secret: create: true caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tLS0tCg== tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tLS0tCg== tls.key: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRS0tLS0tLS0tCg== # ... ``` -------------------------------- ### Install Strimzi Kafka Operator with Custom Replicas Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/packaging/helm-charts/helm3/strimzi-kafka-operator/README.md Use the `--set` argument to specify the number of replicas for the Strimzi Kafka Operator during installation. This allows for scaling the operator deployment. ```bash helm install my-strimzi-cluster-operator --set replicas=2 oci://quay.io/strimzi-helm/strimzi-kafka-operator ``` -------------------------------- ### Example Kafka Cluster Configuration Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/api/io.strimzi.api.kafka.model.kafka.KafkaClusterSpec.adoc Demonstrates how to configure Kafka broker options such as topic replication factors and topic creation policies using YAML. ```yaml apiVersion: {KafkaApiVersion} kind: Kafka metadata: name: my-cluster spec: kafka: version: {DefaultKafkaVersion} metadataVersion: {DefaultKafkaMetadataVersion} # ... config: auto.create.topics.enable: "false" offsets.topic.replication.factor: 3 transaction.state.log.replication.factor: 3 transaction.state.log.min.isr: 2 default.replication.factor: 3 min.insync.replicas: 2 ``` -------------------------------- ### YAML Configuration Example with Attributes Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/contributing/styleguide.adoc Use AsciiDoc code blocks for configuration examples, specifying 'yaml' as the source language and using 'subs="+quotes"' for attributes and formatting. Use `#` for callout numbers and `# ...` for omitted lines. ```yaml api_version: {KafkaApiVersion} kind: Kafka metadata: name: my-cluster spec: kafka: replicas: *3* # <1> # ... <3> ``` -------------------------------- ### Deploy Cluster Operator Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/TESTING.md Installs the Cluster Operator using its default configuration. This is typically done before other test setup. ```java @BeforeAll void setup(ExtensionContext extensionContext){ // deploy Cluster Operator using default configuration SetupClusterOperator .getInstance() .withDefaultConfiguration() .install(); } ``` -------------------------------- ### Generate Checksums for Release Files Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/RELEASE.md Generate checksums for Helm charts, installation files, and examples. These commands should be run on the release branch after creating the release artifacts. ```bash make checksum_helm make checksum_install make checksum_examples ``` -------------------------------- ### Example Topic Description Output Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-changing-topic-replicas.adoc This output shows the partition details, including leader and replica information, for a topic. ```shell my-topic Partition: 0 Leader: 0 Replicas: 0,1,2 Isr: 0,1,2 my-topic Partition: 1 Leader: 2 Replicas: 1,2,3 Isr: 1,2,3 my-topic Partition: 2 Leader: 3 Replicas: 2,3,4 Isr: 2,3,4 ``` -------------------------------- ### Output showing pods running in two node pools Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-splitting-node-pool-roles.adoc Example output of 'kubectl get pods' showing nodes from both 'pool-a' and 'pool-b', indicating successful creation. ```shell NAME READY STATUS RESTARTS my-cluster-pool-a-0 1/1 Running 0 my-cluster-pool-a-1 1/1 Running 0 my-cluster-pool-a-2 1/1 Running 0 my-cluster-pool-b-3 1/1 Running 0 my-cluster-cluster-b-4 1/1 Running 0 my-cluster-pool-b-5 1/1 Running 0 ``` -------------------------------- ### Initialize Catalog Index Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/RELEASE.md Initialize the catalog index file in YAML format using 'opm init'. Specify the package name and default channel. ```shell opm init strimzi-kafka-operator --default-channel=stable --output yaml > strimzi-catalog/index.yaml ``` -------------------------------- ### Annotate CA certificate secret Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/security/proc-installing-your-own-ca-certificates.adoc Annotate the secret containing your CA certificate with `strimzi.io/ca-cert-generation`. Start with '0' for the initial setup and increment for renewals. This annotation helps manage certificate generations. ```shell kubectl annotate secret strimzi.io/ca-cert-generation="" ``` -------------------------------- ### Example MirrorMaker 2 Pod Output Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-kafka-mirror-maker.adoc This output shows a running MirrorMaker 2 pod. 'READY' indicates the number of ready versus expected replicas, and 'STATUS' should be 'Running'. ```shell NAME READY STATUS RESTARTS my-mm2-cluster-mirrormaker2- 1/1 Running 1 ``` -------------------------------- ### Example Role to access values from a config map Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-loading-config-from-config-map.adoc Define a Kubernetes Role that grants the necessary permissions to 'get' specific ConfigMaps. This is required for the Kafka Connect service account to read configuration values. ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: connector-configuration-role rules: - apiGroups: [""] resources: ["configmaps"] resourceNames: ["my-connector-configuration"] verbs: ["get"] # ... ``` -------------------------------- ### Example pod output Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-managing-storage-affinity-node-pools.adoc The output shows the Kafka nodes created in 'pool-zone-1' and 'pool-zone-2', indicating successful deployment and readiness. ```shell NAME READY STATUS RESTARTS my-cluster-pool-zone-1-kafka-0 1/1 Running 0 my-cluster-pool-zone-1-kafka-1 1/1 Running 0 my-cluster-pool-zone-1-kafka-2 1/1 Running 0 my-cluster-pool-zone-2-kafka-3 1/1 Running 0 my-cluster-pool-zone-2-kafka-4 1/1 Running 0 my-cluster-pool-zone-2-kafka-5 1/1 Running 0 my-cluster-pool-zone-2-kafka-6 1/1 Running 0 ``` -------------------------------- ### Example Node Pool Configuration with JBOD Storage Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/cruise-control/proc-cruise-control-moving-data.adoc Configures a Kafka node pool with JBOD storage, specifying multiple volumes for partition distribution. This setup is crucial for enabling partition reassignment between disks. ```yaml apiVersion: {KafkaNodePoolApiVersion} kind: KafkaNodePool metadata: name: pool-a labels: strimzi.io.cluster: my-cluster spec: replicas: 3 roles: - broker storage: type: jbod volumes: - id: 0 type: persistent-claim size: 2000Gi - id: 1 type: persistent-claim size: 2000Gi - id: 2 type: persistent-claim size: 2000Gi # ... ``` -------------------------------- ### Apply Kafka Metrics Configuration File Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/metrics/proc-strimzi-metrics-reporter-kafka-deploy-options.adoc Apply the example `kafka-metrics.yaml` file to create or update a Kafka resource with metrics configuration. This enables the Strimzi Metrics Reporter. ```shell kubectl apply -f kafka-metrics.yaml ``` -------------------------------- ### Example JBOD storage configuration for KRaft metadata Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/con-config-storage-kraft-metadata.adoc Configure JBOD storage to use a specific volume (ID 1) for the KRaft metadata log. This is useful when you want to dedicate a particular volume for metadata storage in a multi-volume setup. ```yaml apiVersion: {KafkaApiVersion} kind: KafkaNodePool metadata: name: pool-a # ... spec: storage: type: jbod volumes: - id: 0 type: persistent-claim size: 100Gi - id: 1 type: persistent-claim size: 100Gi kraftMetadata: shared # ... ``` -------------------------------- ### KafkaRebalance resource with auto-approval enabled Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/cruise-control/con-cruise-control-overview.adoc Example of a KafkaRebalance resource configuration that enables the auto-approval mechanism for Cruise Control optimization proposals. When this annotation is set to true, Cruise Control will immediately start a cluster rebalance upon generation of an optimization proposal. ```yaml apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaRebalance metadata: name: my-cluster-rebalance annotations: strimzi.io/rebalance-auto-approval: "true" spec: clusterRef: name: my-cluster goals: - ContinuousAvailability - ContinuousUnderReplicatedPartitions - Dubrovnik - Kadenza - MinimumInSyncReplicas - ZookeeperRackAware rebalance: goals: - RackAware topics: - topic-a - topic-b ``` -------------------------------- ### Configure maintenance time window Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/con-maintenance-time-window-definition.adoc Configure an array of strings using the `Kafka.spec.maintenanceTimeWindows` property of the `Kafka` resource. Each string is a Cron expression interpreted as being in UTC. This example configures a single maintenance time window that starts at midnight and ends at 01:59am (UTC), on Sundays, Mondays, Tuesdays, Wednesdays, and Thursdays. ```yaml apiVersion: {KafkaApiVersion} kind: Kafka metadata: name: my-cluster spec: kafka: #... maintenanceTimeWindows: - "* * 0-1 ? * SUN,MON,TUE,WED,THU *" #... ``` -------------------------------- ### Generate HTML Documentation Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/contributing/make-tooling.adoc Use `make docu_html` from the project root to generate HTML versions of all documentation guides. Output is placed in `documentation/html`. ```shell make docu_html ``` -------------------------------- ### Install Strimzi Cluster Operator with Helm Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-cluster-operator-helm-chart.adoc Use this command to install the Strimzi Cluster Operator using the default configuration. Ensure the Helm client is installed. ```shell helm install strimzi-cluster-operator oci://quay.io/strimzi-helm/strimzi-kafka-operator ``` -------------------------------- ### Example Kubernetes TLS Secret Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/install/drain-cleaner/kubernetes/README.md This is an example of the resulting Kubernetes Secret of type `kubernetes.io/tls` after creation. ```yaml apiVersion: v1 kind: Secret metadata: creationTimestamp: "2022-08-29T13:57:14Z" name: strimzi-drain-cleaner namespace: strimzi-drain-cleaner resourceVersion: "224173" uid: 10583b09-b8e1-4d34-bf35-10d4f247026d type: kubernetes.io/tls data: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1RENDQWN3Q0ZCUlJsaERKU0dKWkZtbHYwWFd6RWtSVkxUWjNNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1DTXgKSVRBZkJnTlZCQU1NR0ZOMGNtbHRlbWtnUkhKaGFXNGdRMnhsWVc1bGNpQkRRVEFlRncweU1qQTRNamt4TXpVegpNVGxhRncweU1qQTVNamd4TXpVek1UbGFNRG94T0RBMkJnTlZCQU1NTDNOMGNtbHRlbWt0WkhKaGFXNHRZMnhsCllXNWxjaTV6ZEhKcGJYcHBMV1J5WVdsdUxXTnNaV0Z1WlhJdWMzWmpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUYKQUFPQ0FROEFNSUlCQ2dLQ0FRRUEzTWRJSW1PWnVKU09xZ3hEdDdyVEZ2bnVSeS9RY25heGhldVJRcWMwQ05oNQpGTmRkWXYzZ3ZvNUQrNjlqSmwyRFMzOVgyNXhKSXF6eW5GR0NhdUd3SUk5dVE1ME53OVJBeHpldDNsQytDNDVYClMyc3p5UzA4OW91b1d1R1ZaYVZ4QzJlbkRuZCtYOXdzMWp5eEdqN093SVJvdG5CK096WFJsdFpIb001Z3dRcEUKVFVpR0VUdTRzQUtVeWZMbUNKVjVSWEtoZm1mNWNQT2E0ck13cTdPY2VRMzBmdGZSQWdVdGtOWm4wczNOZHQzUApzZjNUOXhXbHVkUlJVQzZ2VnNHZ2RZWmFpSDFOaHNSWkxVQ2JKT1Zic0kyMEh3NnFpOHUvT0JCZjU3bG83SUFLClZRSGhQRXB2NkI5cFRaR3kxR0NUcUxGdHhzUkRPYmt3eFJwWFVPWStxd0lEQVFBQk1BMEdDU3FHU0liM0RRRUIKQ3dVQUE0SUJBUUI1aTFWVkc0alFzb1pRSnRXeFA3c3FvWlRSNHdBejdWWlp2ME4xZkpFL1hlWng1bGNpRzdjagpKYkgxdjhuT3ZJc2FpaVNsWUJKNTJHRThmem5EZDJXTFZNczZ0d3VNc0hXa215dFZxT0VEY01GWmErSjN6eklKCnRpSHhGVHIrV2wrTmlOUCtDTzNOMmp3VWNIV0hwTm9TOUNBU01oNStnYjlHV2RxUFRKRCtSZmRTRk80aTFQNDkKcUlCOW8wRkJ3Nkc3L0ZXeG1jRHY3TmgzS2RiVzdwZDhPeCtCdjJlanZ2WXRzUzNBUmx2c0ZpWEh2N0lTdmV6aQphRnJMaElFcURFcHBMcmZTRU85VmR6N1VvV3NKV1BjdmwwQmJxRVNrakh3S2JJaFBrNzdRRU95QWFkRE5YTUFoCmJUUHg2czZLbStMUTQzWVhxTHMwODBjNWR4a01IbWJxCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K ``` -------------------------------- ### Deploy the Access Operator Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-deploy-access-operator.adoc Deploy the Access Operator using the installation files from the install directory. ```shell kubectl create -f ./install/access-operator ``` -------------------------------- ### Prometheus Installation Resource File Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/assemblies/metrics/assembly-metrics-config-files.adoc This YAML file is the installation resource file for the Prometheus image. ```yaml prometheus.yaml ``` -------------------------------- ### Routes created for bootstraps and brokers Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/security/proc-accessing-kafka-using-routes.adoc Example output showing the routes created for Kafka bootstrap and broker services. These routes are preconfigured with TLS passthrough. ```shell NAME HOST/PORT SERVICES PORT TERMINATION my-cluster-kafka-external1-0 my-cluster-kafka-external1-0-my-project.router.com my-cluster-kafka-external1-0 9094 passthrough my-cluster-kafka-external1-1 my-cluster-kafka-external1-1-my-project.router.com my-cluster-kafka-external1-1 9094 passthrough my-cluster-kafka-external1-2 my-cluster-kafka-external1-2-my-project.router.com my-cluster-kafka-external1-2 9094 passthrough my-cluster-kafka-external1-bootstrap my-cluster-kafka-external1-bootstrap-my-project.router.com my-cluster-kafka-external1-bootstrap 9094 passthrough ``` -------------------------------- ### Example: Delete a Secret Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/deploying/proc-uninstalling.adoc Example command to delete a specific secret resource associated with a Strimzi deployment. ```shell kubectl delete secret my-cluster-clients-ca-cert -n my-project ``` -------------------------------- ### Example topic configuration for my-topic Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-generating-reassignment-json-files.adoc Defines a Kafka topic with a specified number of partitions, replicas, and retention configuration. ```yaml apiVersion: {KafkaTopicApiVersion} kind: KafkaTopic metadata: name: my-topic labels: strimzi.io/cluster: my-cluster spec: partitions: 10 replicas: 3 config: retention.ms: 7200000 segment.bytes: 1073741824 # ... ``` -------------------------------- ### Variable Definition Example Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/contributing/styleguide.adoc Define variables in 'shared/attributes.adoc' and use curly braces `{}` to insert them into configuration examples. ```asciidoc :DefaultKafkaVersion: {DefaultKafkaVersion} ``` -------------------------------- ### Example Table Headings Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/contributing/contributor-guide.adoc Demonstrates how to define table headings and content in AsciiDoc. ```asciidoc .File connectors [cols="2*",options="header"] |=== |File Connector |Description |FileStreamSourceConnector |Transfers data to your Kafka cluster from a file (the source). |=== ``` -------------------------------- ### Example status for bootstrap route Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/security/proc-accessing-kafka-using-routes.adoc Example of the status section for a bootstrap route, showing the ingress host information. ```yaml status: ingress: - host: >- ``` -------------------------------- ### Configure Broker Rack Awareness and Init Container Image Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/api/io.strimzi.api.kafka.model.kafka.KafkaClusterSpec.adoc This example shows how to enable topology-label-based rack awareness and specify a custom container image for the init container that collects node labels. This is useful when your network requires custom image registries. ```yaml apiVersion: {KafkaApiVersion} kind: Kafka metadata: name: my-cluster spec: kafka: # ... rack: type: topology-label topologyKey: topology.kubernetes.io/zone brokerRackInitImage: my-org/my-image:latest # ... ---- ``` -------------------------------- ### Prometheus Alerting Rules Examples Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/assemblies/metrics/assembly-metrics-config-files.adoc These YAML files provide examples of alerting rules for use with Prometheus Alertmanager. ```yaml prometheus-kafka-bridge-rules.yaml ``` ```yaml prometheus-kafka-certificate-rules.yaml ``` ```yaml prometheus-kafka-connect-rules.yaml ``` ```yaml prometheus-kafka-rules.yaml ``` ```yaml prometheus-kafka-exporter-topic-rules.yaml ``` ```yaml prometheus-mirrormaker2-rules.yaml ``` ```yaml prometheus-strimzi-cluster-operator-rules.yaml ``` ```yaml prometheus-strimzi-entity-operator-rules.yaml ``` -------------------------------- ### Example Consumer Configuration for Minimizing Rebalances Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/managing/con-consumer-config-properties.adoc This configuration demonstrates properties to reduce the impact of consumer group rebalances. It includes static membership, adjusted poll intervals and limits, and a cooperative partition assignment strategy. ```shell # ... group.instance.id= max.poll.interval.ms=300000 max.poll.records=500 session.timeout.ms=30000 heartbeat.interval.ms=5000 partition.assignment.strategy=org.apache.kafka.clients.consumer.CooperativeStickyAssignor ``` -------------------------------- ### Example connector configuration referencing the files Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-loading-config-from-files.adoc This YAML configures a KafkaConnector, demonstrating how to reference credentials from mounted files using the `directory::` placeholder format for SSL keystore and truststore properties. ```yaml apiVersion: {KafkaConnectorApiVersion} kind: KafkaConnector metadata: name: my-source-connector labels: strimzi.io/cluster: my-connect-cluster spec: class: io.debezium.connector.mysql.MySqlConnector tasksMax: 2 config: # ... database.history.producer.security.protocol: SSL database.history.producer.ssl.truststore.type: PEM database.history.producer.ssl.truststore.certificates: "${directory:/mnt/cluster-ca:ca.crt}" database.history.producer.ssl.keystore.type: PEM database.history.producer.ssl.keystore.certificate.chain: "${directory:/mnt/my-user:user.crt}" database.history.producer.ssl.keystore.key: "${directory:/mnt/my-user:user.key}" #... ``` -------------------------------- ### Install Strimzi Drain Cleaner Helm Chart Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/drain-cleaner/proc-drain-cleaner-deploying-helm-chart.adoc Use this command to install the Strimzi Drain Cleaner with default configurations. ```shell helm install strimzi-drain-cleaner oci://quay.io/strimzi-helm/strimzi-drain-cleaner ``` -------------------------------- ### Example reassignment file showing updated replicas Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/configuring/proc-changing-topic-replicas.adoc This JSON file shows the reassignment configuration after a replica has been removed from each partition. ```shell {"version":1,"partitions":[{"topic":"my-topic","partition":0,"replicas":[0,1,2],"log_dirs":["any","any","any","any"]},{"topic":"my-topic","partition":1,"replicas":[1,2,3],"log_dirs":["any","any","any","any"]},{"topic":"my-topic","partition":2,"replicas":[2,3,4],"log_dirs":["any","any","any","any"]}]} ``` -------------------------------- ### Run System Tests with Helper Script Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/TESTING.md The ./systemtest/scripts/run_tests.sh script provides a convenient way to run system tests with configurations similar to GitHub Actions. ```bash ./systemtest/scripts/run_tests.sh ``` -------------------------------- ### Example Output of kafka-log-dirs.sh Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/modules/cruise-control/proc-cruise-control-moving-data.adoc Illustrates the JSON output from `kafka-log-dirs.sh`, showing partition details, their sizes, and the log directory path on each broker. This output is used to analyze partition distribution. ```json { "brokers": [ { "broker": 0, # <1> "logDirs": [ { "partitions": [ { "partition": "my-topic-5", "size": 0, "offsetLag": 0, "isFuture": false }, { "partition": "my-topic-2", "size": 0, "offsetLag": 0, "isFuture": false } ], "error": null, # <3> "logDir": "/var/lib/kafka/data-2/kafka-log0" # <4> }, { "partitions": [ { "partition": "my-topic-0", "size": 0, "offsetLag": 0, "isFuture": false }, { "partition": "my-topic-3", "size": 0, "offsetLag": 0, "isFuture": false } ], "error": null, "logDir": "/var/lib/kafka/data-0/kafka-log0" }, { "partitions": [ { "partition": "my-topic-4", "size": 0, "offsetLag": 0, "isFuture": false }, { "partition": "my-topic-1", "size": 0, "offsetLag": 0, "isFuture": false } ], "error": null, "logDir": "/var/lib/kafka/data-1/kafka-log0" } ] ``` -------------------------------- ### Example Secret for SCRAM-SHA-256 Authentication Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/api/io.strimzi.api.kafka.model.common.authentication.KafkaClientAuthenticationScramSha256.adoc This is an example of a Kubernetes Secret resource that stores the password for SCRAM-SHA-256 authentication. The password should be base64 encoded. ```yaml apiVersion: v1 kind: Secret metadata: name: my-connect-secret-name type: Opaque data: my-connect-password-field: LFTIyFRFlMmU2N2Tm ``` -------------------------------- ### Example rack configuration for Kafka Connect Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/documentation/api/io.strimzi.api.kafka.model.kafka.KafkaClusterSpec.adoc Configure rack awareness for Kafka Connect by specifying the rack field within the Kafka Connect resource. ```yaml apiVersion: {KafkaConnectApiVersion} kind: KafkaConnect metadata: name: my-connect-cluster spec: image: strimzi/kafka-connect:latest replicas: 3 kafkaConnectCluster: my-cluster rack: topologyKey: "kubernetes.io/zone" names: - us-east-1a - us-east-1b - us-east-1c ``` -------------------------------- ### Create Subscription for Strimzi Operator Source: https://github.com/strimzi/strimzi-kafka-operator/blob/main/development-docs/RELEASE.md Create a Subscription resource to install the Strimzi operator from the 'strimzi-catalog'. OLM will use this to install the operator. ```shell kubectl apply -f - <