此内容没有您所选择的语言版本。
Chapter 2. Managed broker configurations
When you deploy Streams for Apache Kafka on OpenShift, you specify broker configuration through the config property of the Kafka custom resource. However, certain broker configuration options are managed directly by Streams for Apache Kafka and cannot be set within this config property.
As such, if you are using Streams for Apache Kafka on OpenShift, you cannot configure the following options through the config property:
-
node.idto specify the ID of the Kafka node -
log.dirsdirectories for log data -
listenersto expose the Kafka cluster to clients -
authorizationmechanisms to allow or decline actions executed by users -
authenticationmechanisms to prove the identity of users requiring access to Kafka
Node IDs start from 0 (zero) and run sequentially across the Kafka cluster. Log directories are mounted to /var/lib/kafka/data/kafka-log<pod_id> based on the spec.storage configuration specified in the KafkaNodePool custom resource. For JBOD storage, they are mounted at /var/lib/kafka/data-<volume_id>/kafka-log<pod_id>.
For a list of exclusions, see the KafkaClusterSpec schema reference.
These exclusions don’t apply when using Streams for Apache Kafka on RHEL. In this case, you need to add these properties in your basic broker configuration to identify your brokers and provide secure access.
Example broker configuration for Streams for Apache Kafka on RHEL
# ...
node.id = 1
process.roles = broker
# controller listeners
controller.quorum.bootstrap.servers=localhost:9090, localhost:9091, localhost:9092
controller.listener.names = CONTROLLER
metadata.log.dir = /var/lib/kafka/metadata
# broker listeners
listeners = CLIENT://0.0.0.0:9093, INTERNAL://0.0.0.0:9094
inter.broker.listener.name = INTERNAL
listener.security.protocol.map = CLIENT:SSL,INTERNAL:SSL
# advertized listener for CLIENT connections (external access)
advertised.listeners = CLIENT://my-broker-1.my-domain.com:9093, INTERNAL://my-broker-1.my-domain.com:9094
# Authentication settings for listeners
ssl.keystore.type = PKCS12
ssl.keystore.location = /path/to/keystore.p12
ssl.keystore.password = keystore-password
ssl.truststore.type = PKCS12
ssl.truststore.location = /path/to/truststore.p12
ssl.truststore.password = truststore-password
ssl.client.auth = required
# authorization settings
authorizer.class.name = org.apache.kafka.metadata.authorizer.StandardAuthorizer
super.users = User:superuser
# ...