简体   繁体   English

如何激活和配置ElasticSearch Kafka Connect接收器?

[英]How to activate and configure ElasticSearch Kafka Connect sink?

I'm trying to setup Kafka in a Kubernetes cluster using helm. 我正在尝试使用头盔在Kubernetes集群中设置Kafka。

I've used the Confluent helm chart , which is quite complete, to install Kafka. 我已经使用了非常完善的Confluent掌舵图来安装Kafka。

I then tried to see how elastic Kafka connect sink is configured. 然后,我尝试查看如何配置弹性Kafka连接接收器 One point particularly strikes me : the confluent load elasticsearch-sink command. 有一点特别confluent load elasticsearch-sink我: confluent load elasticsearch-sink命令。 How can I have it done reproducibely when container is started ? 启动容器时如何重现? Furthermore, to configure elastic, I have to set a properties file. 此外,要配置弹性,我必须设置一个属性文件。 Am I right to use a ConfigMap ? 我可以使用ConfigMap吗? I'm however confused, because I'll have to change YAML configuration produced by helm, which doesn't seems so reproducable ... 但是我很困惑,因为我必须更改由头盔生成的YAML配置,这似乎没有那么可重复...

Has someone any advice ? 有人建议吗?

One point particularly strikes me : the confluent load elasticsearch-sink command 有一点特别confluent load elasticsearch-sinkconfluent load elasticsearch-sink命令

The confluent command is meant to be used on localhost development / getting started envionments only . confluent命令只能在localhost开发/入门环境中使用 It therefore wouldn't know about Kubernetes (eg you would need an Ingress controller to expose the Connect REST API). 因此,它不会了解Kubernetes(例如,您需要一个Ingress控制器来公开Connect REST API)。

Am I right to use a ConfigMap ? 我可以使用ConfigMap吗?

I don't think that is correct. 我认为那是不正确的。 At least not outside of an Operator Framework for Kafka Connect (if one existed). 至少不要在Kafka Connect的操作员框架之外(如果存在)。

Connect is configured through a JSON REST API . 通过JSON REST API配置 Connect。

Therefore, also isn't available to load a configuration at startup. 因此,在启动时也无法加载配置。 It needs to be POST'd manually, then that config will be persisted in the CONNECT_CONFIG_STORAGE_TOPIC of Kafka. 需要手动对其进行POST,然后该配置将保留在Kafka的CONNECT_CONFIG_STORAGE_TOPIC中。

Internally, confluent load is literally a curl -XPOST -H 'Content-Type: application/json' -d${file} localhost:8083/connectors 在内部, curl -XPOST -H 'Content-Type: application/json' -d${file} localhost:8083/connectors confluent load实际上是一个curl -XPOST -H 'Content-Type: application/json' -d${file} localhost:8083/connectors

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM