Skip to content

Compare two empty Kafka clusters

A sanity check: are two fresh clusters equal?

Terminal recording of kurkik kafka diff

The recording shows kurkik kafka diff on the demo sandbox; its data differs from this example.

Shown here: one broker. Other broker setups are further down.

Terminal window
kurkik kafka diff a b --configs --acls --groups
a vs b
cluster MkU3OEVBNTcwNTJENDM2Qk
Notes
- Broker settings that name a machine were not compared: advertised.listeners, broker.id, controller.quorum.voters, listeners, node.id.
- Not compared: schemas. Add --schemas, or --all, to compare them.
Drift: 0 changed · 0 unmanaged · 0 missing (no drift) - 11 matched

Exit code 0: no drift.

Mark Means
~ both sides have it, but it differs
! only the first side has it
+ only the second side has it
Compare Command Result
two clusters kurkik kafka diff a b --configs --acls --groups Drift: 0 changed · 0 unmanaged · 0 missing (no drift) - 11 matched
a document and a cluster kurkik kafka diff a.yaml b --configs --acls --groups Drift: 0 changed · 0 unmanaged · 0 missing (no drift) - 11 matched
two documents kurkik kafka diff a.yaml b.yaml --configs --acls --groups Drift: 0 changed · 0 unmanaged · 0 missing (no drift) - 11 matched

Download the JSON report (-o json)

a.yaml, 42 lines
asyncapi: 3.0.0
info:
title: a Apache Kafka API
version: 1.0.0-SNAPSHOT
description: "Generated by reading the a cluster. Cluster id: MkU3OEVBNTcwNTJENDM2Qk."
servers:
broker-1:
host: a-kafka-1:9092
protocol: kafka
protocolVersion: "4.4"
x-kurkik:
kafka:
server:
security:
- security: PLAINTEXT
securityProtocol: PLAINTEXT
acl: []
groups: []
brokerConfiguration:
advertised.listeners: "INTERNAL://kafka-1:19092,EXTERNAL://a-kafka-1:9092"
authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer
broker.id: "1"
controller.listener.names: CONTROLLER
controller.quorum.voters: 1@kafka-1:9093
group.initial.rebalance.delay.ms: "0"
inter.broker.listener.name: INTERNAL
listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT"
listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093"
min.insync.replicas: "1"
node.id: "1"
offsets.topic.replication.factor: "1"
process.roles: "broker,controller"
transaction.state.log.min.isr: "1"
transaction.state.log.replication.factor: "1"
clientConfiguration:
bootstrap.servers: a-kafka-1:9092
security.protocol: PLAINTEXT
groupConfiguration: {}
producerConfiguration: {}
consumerConfiguration: {}
channels: {}
operations: {}

Download a.yaml

b.yaml, 42 lines
asyncapi: 3.0.0
info:
title: b Apache Kafka API
version: 1.0.0-SNAPSHOT
description: "Generated by reading the b cluster. Cluster id: MkU3OEVBNTcwNTJENDM2Qk."
servers:
broker-1:
host: b-kafka-1:9092
protocol: kafka
protocolVersion: "4.4"
x-kurkik:
kafka:
server:
security:
- security: PLAINTEXT
securityProtocol: PLAINTEXT
acl: []
groups: []
brokerConfiguration:
advertised.listeners: "INTERNAL://kafka-1:19092,EXTERNAL://b-kafka-1:9092"
authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer
broker.id: "1"
controller.listener.names: CONTROLLER
controller.quorum.voters: 1@kafka-1:9093
group.initial.rebalance.delay.ms: "0"
inter.broker.listener.name: INTERNAL
listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT"
listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093"
min.insync.replicas: "1"
node.id: "1"
offsets.topic.replication.factor: "1"
process.roles: "broker,controller"
transaction.state.log.min.isr: "1"
transaction.state.log.replication.factor: "1"
clientConfiguration:
bootstrap.servers: b-kafka-1:9092
security.protocol: PLAINTEXT
groupConfiguration: {}
producerConfiguration: {}
consumerConfiguration: {}
channels: {}
operations: {}

Download b.yaml

How to build this setup yourself

Brokers

Cluster a

Cluster b

Compare

Terminal window
kurkik conn add kafka a --bootstrap a-kafka-1:9092 --registry-url http://registry-a:8080 --registry-vendor apicurio
kurkik conn add kafka b --bootstrap b-kafka-1:9092 --registry-url http://registry-b:8080 --registry-vendor apicurio
kurkik kafka export a --acls --groups --stdout > a.yaml
kurkik kafka export b --acls --groups --stdout > b.yaml
kurkik kafka diff a b --configs --acls --groups # cluster-vs-cluster
kurkik kafka diff a.yaml b --configs --acls --groups # document-vs-cluster
kurkik kafka diff a.yaml b.yaml --configs --acls --groups # document-vs-document

Same output.

How to build this setup yourself

Brokers

Cluster a

Cluster b

Compare

Terminal window
kurkik conn add kafka a --bootstrap a-kafka-1:9092,a-kafka-2:9092,a-kafka-3:9092 --registry-url http://registry-a:8080 --registry-vendor apicurio
kurkik conn add kafka b --bootstrap b-kafka-1:9092,b-kafka-2:9092,b-kafka-3:9092 --registry-url http://registry-b:8080 --registry-vendor apicurio
kurkik kafka export a --acls --groups --stdout > a.yaml
kurkik kafka export b --acls --groups --stdout > b.yaml
kurkik kafka diff a b --configs --acls --groups # cluster-vs-cluster
kurkik kafka diff a.yaml b --configs --acls --groups # document-vs-cluster
kurkik kafka diff a.yaml b.yaml --configs --acls --groups # document-vs-document
Show the output
a vs b
cluster MkU3OEVBNTcwNTJENDM2Qk
Notes
- Broker settings that name a machine were not compared: advertised.listeners, broker.id, controller.quorum.voters, listeners, node.id.
- Not compared: schemas. Add --schemas, or --all, to compare them.
Drift: 0 changed · 0 unmanaged · 0 missing (no drift) - 23 matched

Download

How to build this setup yourself

Brokers

Cluster a

Cluster b

Compare

Terminal window
kurkik conn add kafka a --bootstrap a-kafka-1:9092,a-kafka-2:9092,a-kafka-3:9092 --registry-url http://registry-a:8080 --registry-vendor apicurio
kurkik conn add kafka b --bootstrap b-kafka-1:9092,b-kafka-2:9092,b-kafka-3:9092 --registry-url http://registry-b:8080 --registry-vendor apicurio
kurkik kafka export a --acls --groups --stdout > a.yaml
kurkik kafka export b --acls --groups --stdout > b.yaml
kurkik kafka diff a b --configs --acls --groups # cluster-vs-cluster
kurkik kafka diff a.yaml b --configs --acls --groups # document-vs-cluster
kurkik kafka diff a.yaml b.yaml --configs --acls --groups # document-vs-document

All flags: kurkik kafka diff · more Apache Kafka diff examples