0

I am configuring a 3 node Kafka Cluster ( 3 brokers and 3 zookeepers with SSL enabled) using docker. Now I need to set up a schema registry. If I just need to use one schema registry is it possible? If Yes how does my SSL trust store and key store configs looks like while running?

I did refer to confluents documentation, where they discuss about Kafka based leader election and zookeeper based leader election, but not clear.

This is my faulty docker run command.

docker run -d \
--net=host \
--name=schema-registry \
-e 
 SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL\
 =localhost:22181,localhost:32181,localhost:42181 \
-e SCHEMA_REGISTRY_HOST_NAME=localhost \
-e SCHEMA_REGISTRY_DEBUG=true \
-e SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL=SSL
-e SCHEMA_REGISTRY_KAFKASTORE_SSL_TRUSTSTORE_LOCATION\
=kafka.broker1.truststore.jks \
-e 
SCHEMA_REGISTRY_KAFKASTORE_SSL_TRUSTSTORE_PASSWORD\
=broker1_truststore_creds \
-e SCHEMA_REGISTRY_KAFKASTORE_SSL_KEYSTORE_LOCATION\
=kafka.broker1.keystore.jks \
-e SCHEMA_REGISTRY_KAFKASTORE_SSL_KEYSTORE_PASSWORD\
=broker1_keystore_creds \
-e SCHEMA_REGISTRY_KAFKASTORE_SSL_KEY_PASSWORD=broker1_sslkey_creds \
-v ${KAFKA_SSL_SECRETS_DIR}:/etc/kafka/secrets \
confluentinc/cp-schema-registry:5.0.1

I am sure my understanding of how schema registry works with a clustered setup is not correct.

Krishnakanth Jc
  • 183
  • 1
  • 14
  • 1
    I'm not sure about docker. I've setup the 3 ZK, 3 Kafka and 3 schema registry virtual environment https://github.com/rajcspsg/VBoxes/tree/master/kafka-schema-registry using vagrant. Please let me know your comments. FYI zookeeper based leader election might be deprecated soon. – user51 Nov 12 '18 at 19:24
  • 1
    The location settings should be a full absolute location, not just a file. Also, in Docker, please don't use `localhost` for connection strings. Use the external service names, and `--net=host` is really a "hack" – OneCricketeer Nov 12 '18 at 23:44

0 Answers0