[英]how to pass MongoDB tls certificates while creating debezium mongodb kafka connector?
We have MongoDB cluster with three replicas.我们有具有三个副本的 MongoDB 集群。 I have enabled preferred TLS and authentication type as MongoDB-X509.我已将首选 TLS 和身份验证类型启用为 MongoDB-X509。
We have three broker strimzi kafka cluster and connect cluster with all required plugins (ie mongoDB provided by debezium) up and running.我们有三个代理 srimzi kafka 集群,并将集群与所有必需的插件(即 debezium 提供的 mongoDB)连接起来并运行。
Now I tried to create mongodb connector with following json:-现在我尝试使用以下 json 创建 mongodb 连接器:-
{
"name": "mongo-connector",
"config": {
"connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
"mongodb.hosts": "rs0/192.168.99.100:27017",
"mongodb.name": "fullfillment",
"collection.include.list": "inventory[.]*",
"mongodb.ssl.enabled": "true",
"mongodb.ssl.invalid.hostname.allowed": "true"
}
}
Then have executed following command to create connector:-然后执行以下命令来创建连接器:-
curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://192.168.99.101:8083/connectors/ -d @mongo.json
Then connectors got created, but when I am checking its status it is showing "as Failed" and connectors are not in Running state.然后创建了连接器,但是当我检查它的状态时,它显示“失败”并且连接器不在运行 state 中。
I was following debezium official docs for MongoDB connector, but not sure how to pass tlsCAfile and tlsCertificateKeyFile which is required for Mongo TLS connection.我正在关注 MongoDB 连接器的 debezium 官方文档,但不确定如何传递 Mongo TLS 连接所需的 tlsCAfile 和 tlsCertificateKeyFile。
As for Strimzi, you can use the external configuration to mount Secrets or Config Maps into the Strimzi Kafka Connect deployment: https://strimzi.io/docs/operators/latest/full/using.html#type-ExternalConfiguration-reference .至于 Strimzi,您可以使用外部配置将 Secrets 或 Config Maps 挂载到 Strimzi Kafka Connect 部署中: https://strimzi.io/docs/operators/latest/full/using.html#type-ExternalConfiguration-reference 。 Once it is loaded into the Pods, you can either just refer to it using the file path, or you can use the Kafka configuration providers to load the data into the configuration options.一旦它被加载到 Pods 中,你既可以使用文件路径来引用它,也可以使用 Kafka 配置提供程序将数据加载到配置选项中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.