如何访问由Strimzi创建的Kafka Connect?

huangapple go评论89阅读模式
英文:

How to access Kafka Connect created by Strimzi?

问题

I'm here to provide translations. Here's the translated text:

我正在尝试通过Strimzi创建的Kafka Connect,通过Redpanda Console来访问。

我通过以下方式安装了我的Kafka Connect:

  1. kubectl apply --filename=hm-kafka-iot-kafka-connect.yaml

hm-kafka-iot-kafka-connect.yaml

  1. apiVersion: kafka.strimzi.io/v1beta2
  2. kind: KafkaConnect
  3. metadata:
  4. name: hm-kafka-iot-kafka-connect
  5. namespace: hm-kafka
  6. annotations:
  7. strimzi.io/use-connector-resources: "true"
  8. spec:
  9. image: ghcr.io/hongbo-miao/hm-kafka-iot-kafka-connect:latest
  10. replicas: 3
  11. bootstrapServers: hm-kafka-kafka-bootstrap:9093
  12. tls:
  13. trustedCertificates:
  14. - secretName: hm-kafka-cluster-ca-cert
  15. certificate: ca.crt
  16. config:
  17. config.storage.replication.factor: 1
  18. offset.storage.replication.factor: 1
  19. status.storage.replication.factor: 1
  20. config.providers: file
  21. config.providers.file.class: org.apache.kafka.common.config.provider.FileConfigProvider
  22. externalConfiguration:
  23. volumes:
  24. - name: hm-iot-db-credentials-volume
  25. secret:
  26. secretName: hm-iot-db-credentials

我通过以下方式安装了Redpanda Console:

  1. helm upgrade \
  2. redpanda-console \
  3. console \
  4. --install \
  5. --repo=https://charts.redpanda.com \
  6. --namespace=hm-redpanda-console \
  7. --create-namespace \
  8. --values=my-values.yaml

my-values.yaml

  1. console:
  2. config:
  3. kafka:
  4. brokers:
  5. - hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
  6. schemaRegistry:
  7. enabled: true
  8. urls:
  9. - http://confluent-schema-registry.hm-confluent-schema-registry.svc:8081
  10. connect:
  11. enabled: true
  12. clusters:
  13. - name: hm-kafka-iot-kafka-connect
  14. url: http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083

然而,我在Redpanda Console的日志中遇到了连接我的Kafka Connect(由Strimzi创建)的错误:

  1. { "level": "info", "ts": "2023-05-06T05:12:24.156Z", "msg": "started Redpanda Console", "version": "v2.2.3", "built_at": "1679491937" }
  2. { "level": "info", "ts": "2023-05-06T05:12:24.156Z", "msg": "connecting to Kafka seed brokers, trying to fetch cluster metadata" }
  3. { "level": "info", "ts": "2023-05-06T05:12:24.165Z", "msg": "successfully connected to kafka cluster", "advertised_broker_count": 1, "topic_count": 12, "controller_id": 0, "kafka_version": "v3.4" }
  4. { "level": "info", "ts": "2023-05-06T05:12:24.165Z", "msg": "creating schema registry client and testing connectivity" }
  5. { "level": "info", "ts": "2023-05-06T05:12:24.175Z", "msg": "successfully tested schema registry connectivity" }
  6. { "level": "info", "ts": "2023-05-06T05:12:24.176Z", "msg": "creating Kafka connect HTTP clients and testing connectivity to all clusters" }
  7. { "level": "warn", "ts": "2023-05-06T05:12:24.182Z", "msg": "connect cluster is not reachable", "cluster_name": "hm-kafka-iot-kafka-connect", "cluster_address": "http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083", "error": "Get \"http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/\": dial tcp 10.43.193.144:8083: connect: connection refused" }
  8. { "level": "info", "ts": "2023-05-06T05:12:24.182Z", "msg": "tested Kafka connect cluster connectivity", "successful_clusters": 0, "failed_clusters": 1 }
  9. { "level": "info", "ts": "2023-05-06T05:12:24.182Z", "msg": "successfully create Kafka connect service" }
  10. { "level": "info", "ts": "2023-05-06T05:12:24.552Z", "msg": "Server listening on address", "address": "[::]:8080", "port": 8080 }
  11. { "level": "warn", "ts": "2023-05-06T05:13:05.781Z", "msg": "failed to list connectors from Kafka connect cluster", "cluster_name": "hm-kafka-iot-kafka-connect", "cluster_address": "http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083", "error": "Get \"http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/connectors?expand=info&expand=status\": dial tcp 10.43.193.144:8083: connect: connection refused" }
  12. { "level": "error", "ts": "2023-05-06T05:13:05.807Z", "msg": "Sending REST error", "cluster_name": "hm-kafka-iot-kafka-connect", "route": "/api/kafka-connect/clusters/hm-kafka-iot-kafka-connect", "method": "GET", "status_code": 503, "remote_address": "127.0.0.1:43902", "public_error": "Failed to get cluster info: Get \"http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/\": dial tcp 10.43.193.144:8083: connect: connection refused", "error": "Get \"http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/\": dial tcp 10.43.193.144:8083: connect: connection refused" }

在Redpanda Console的UI中,显示如下:

如何访问由Strimzi创建的Kafka Connect?

然而,如果我在本地进行port-forward到Kafka Connect,我可以通过以下方式访问它:

  1. # 打开第一个终端
  2. kubectl port-forward service/hm-kafka-iot
  3. <details>
  4. <summary>英文:</summary>
  5. I am trying to access Kafka Connect created by [Strimzi](https://github.com/strimzi/strimzi-kafka-operator) through [Redpanda Console](https://github.com/redpanda-data/console).
  6. I installed my Kafka Connect by
  7. ```shell
  8. kubectl apply --filename=hm-kafka-iot-kafka-connect.yaml

hm-kafka-iot-kafka-connect.yaml

  1. apiVersion: kafka.strimzi.io/v1beta2
  2. kind: KafkaConnect
  3. metadata:
  4. name: hm-kafka-iot-kafka-connect
  5. namespace: hm-kafka
  6. annotations:
  7. strimzi.io/use-connector-resources: &quot;true&quot;
  8. spec:
  9. image: ghcr.io/hongbo-miao/hm-kafka-iot-kafka-connect:latest
  10. replicas: 3
  11. bootstrapServers: hm-kafka-kafka-bootstrap:9093
  12. tls:
  13. trustedCertificates:
  14. - secretName: hm-kafka-cluster-ca-cert
  15. certificate: ca.crt
  16. config:
  17. config.storage.replication.factor: 1
  18. offset.storage.replication.factor: 1
  19. status.storage.replication.factor: 1
  20. config.providers: file
  21. config.providers.file.class: org.apache.kafka.common.config.provider.FileConfigProvider
  22. externalConfiguration:
  23. volumes:
  24. - name: hm-iot-db-credentials-volume
  25. secret:
  26. secretName: hm-iot-db-credentials

I installed Redpanda Console by

  1. helm upgrade \
  2. redpanda-console \
  3. console \
  4. --install \
  5. --repo=https://charts.redpanda.com \
  6. --namespace=hm-redpanda-console \
  7. --create-namespace \
  8. --values=my-values.yaml

my-values.yaml:

  1. console:
  2. config:
  3. kafka:
  4. brokers:
  5. - hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
  6. schemaRegistry:
  7. enabled: true
  8. urls:
  9. - http://confluent-schema-registry.hm-confluent-schema-registry.svc:8081
  10. connect:
  11. enabled: true
  12. clusters:
  13. - name: hm-kafka-iot-kafka-connect
  14. url: http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083

However, I got error connecting my Kafka Connect which is created by Strimzi in the Redpanda Console pod log:

  1. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.156Z&quot;,&quot;msg&quot;:&quot;started Redpanda Console&quot;,&quot;version&quot;:&quot;v2.2.3&quot;,&quot;built_at&quot;:&quot;1679491937&quot;}
  2. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.156Z&quot;,&quot;msg&quot;:&quot;connecting to Kafka seed brokers, trying to fetch cluster metadata&quot;}
  3. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.165Z&quot;,&quot;msg&quot;:&quot;successfully connected to kafka cluster&quot;,&quot;advertised_broker_count&quot;:1,&quot;topic_count&quot;:12,&quot;controller_id&quot;:0,&quot;kafka_version&quot;:&quot;v3.4&quot;}
  4. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.165Z&quot;,&quot;msg&quot;:&quot;creating schema registry client and testing connectivity&quot;}
  5. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.175Z&quot;,&quot;msg&quot;:&quot;successfully tested schema registry connectivity&quot;}
  6. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.176Z&quot;,&quot;msg&quot;:&quot;creating Kafka connect HTTP clients and testing connectivity to all clusters&quot;}
  7. {&quot;level&quot;:&quot;warn&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.182Z&quot;,&quot;msg&quot;:&quot;connect cluster is not reachable&quot;,&quot;cluster_name&quot;:&quot;hm-kafka-iot-kafka-connect&quot;,&quot;cluster_address&quot;:&quot;http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083&quot;,&quot;error&quot;:&quot;Get \&quot;http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/\&quot;: dial tcp 10.43.193.144:8083: connect: connection refused&quot;}
  8. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.182Z&quot;,&quot;msg&quot;:&quot;tested Kafka connect cluster connectivity&quot;,&quot;successful_clusters&quot;:0,&quot;failed_clusters&quot;:1}
  9. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.182Z&quot;,&quot;msg&quot;:&quot;successfully create Kafka connect service&quot;}
  10. {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2023-05-06T05:12:24.552Z&quot;,&quot;msg&quot;:&quot;Server listening on address&quot;,&quot;address&quot;:&quot;[::]:8080&quot;,&quot;port&quot;:8080}
  11. {&quot;level&quot;:&quot;warn&quot;,&quot;ts&quot;:&quot;2023-05-06T05:13:05.781Z&quot;,&quot;msg&quot;:&quot;failed to list connectors from Kafka connect cluster&quot;,&quot;cluster_name&quot;:&quot;hm-kafka-iot-kafka-connect&quot;,&quot;cluster_address&quot;:&quot;http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083&quot;,&quot;error&quot;:&quot;Get \&quot;http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/connectors?expand=info&amp;expand=status\&quot;: dial tcp 10.43.193.144:8083: connect: connection refused&quot;}
  12. {&quot;level&quot;:&quot;error&quot;,&quot;ts&quot;:&quot;2023-05-06T05:13:05.807Z&quot;,&quot;msg&quot;:&quot;Sending REST error&quot;,&quot;cluster_name&quot;:&quot;hm-kafka-iot-kafka-connect&quot;,&quot;route&quot;:&quot;/api/kafka-connect/clusters/hm-kafka-iot-kafka-connect&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;status_code&quot;:503,&quot;remote_address&quot;:&quot;127.0.0.1:43902&quot;,&quot;public_error&quot;:&quot;Failed to get cluster info: Get \&quot;http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/\&quot;: dial tcp 10.43.193.144:8083: connect: connection refused&quot;,&quot;error&quot;:&quot;Get \&quot;http://hm-kafka-iot-kafka-connect-connect-api.hm-kafka:8083/\&quot;: dial tcp 10.43.193.144:8083: connect: connection refused&quot;}

And in the Redpanda Console UI, it shows:

如何访问由Strimzi创建的Kafka Connect?

However, if I port-forward Kafka Connect locally, I can reach to it by

  1. # Open first terminal
  2. kubectl port-forward service/hm-kafka-iot-kafka-connect-connect-api --namespace=hm-kafka 8083:8083
  3. Forwarding from 127.0.0.1:8083 -&gt; 8083
  4. Forwarding from [::1]:8083 -&gt; 8083
  5. Handling connection for 8083
  6. # Open second terminal
  7. curl --location &#39;http://localhost:8083/connectors?expand=info&amp;expand=status&#39;
  8. {&quot;hm-motor-jdbc-sink-kafka-connector&quot;:{&quot;info&quot;:{&quot;name&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;config&quot;:{&quot;connector.class&quot;:&quot;io.confluent.connect.jdbc.JdbcSinkConnector&quot;,&quot;table.name.format&quot;:&quot;motor&quot;,&quot;transforms.convertTimestamp.target.type&quot;:&quot;Timestamp&quot;,&quot;connection.password&quot;:&quot;${file:/opt/kafka/external-configuration/hm-iot-db-credentials-volume/iot-db-credentials.properties:timescaledb_password}&quot;,&quot;topics&quot;:&quot;hm.motor&quot;,&quot;tasks.max&quot;:&quot;8&quot;,&quot;batch.size&quot;:&quot;100000&quot;,&quot;transforms&quot;:&quot;convertTimestamp&quot;,&quot;transforms.convertTimestamp.type&quot;:&quot;org.apache.kafka.connect.transforms.TimestampConverter$Value&quot;,&quot;value.converter.schema.registry.url&quot;:&quot;http://confluent-schema-registry.hm-confluent-schema-registry.svc:8081&quot;,&quot;transforms.convertTimestamp.field&quot;:&quot;timestamp&quot;,&quot;connection.user&quot;:&quot;${file:/opt/kafka/external-configuration/hm-iot-db-credentials-volume/iot-db-credentials.properties:timescaledb_user}&quot;,&quot;name&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;connection.url&quot;:&quot;jdbc:postgresql://timescale.hm-timescale.svc:5432/hm_iot_db&quot;,&quot;value.converter&quot;:&quot;io.confluent.connect.avro.AvroConverter&quot;,&quot;insert.mode&quot;:&quot;insert&quot;,&quot;pk.mode&quot;:&quot;record_value&quot;,&quot;pk.fields&quot;:&quot;timestamp&quot;},&quot;tasks&quot;:[{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:0},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:1},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:2},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:3},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:4},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:5},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:6},{&quot;connector&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;task&quot;:7}],&quot;type&quot;:&quot;sink&quot;},&quot;status&quot;:{&quot;name&quot;:&quot;hm-motor-jdbc-sink-kafka-connector&quot;,&quot;connector&quot;:{&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.21:8083&quot;},&quot;tasks&quot;:[{&quot;id&quot;:0,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.21:8083&quot;},{&quot;id&quot;:1,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.18:8083&quot;},{&quot;id&quot;:2,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.20:8083&quot;},{&quot;id&quot;:3,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.19:8083&quot;},{&quot;id&quot;:4,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.22:8083&quot;},{&quot;id&quot;:5,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.21:8083&quot;},{&quot;id&quot;:6,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.18:8083&quot;},{&quot;id&quot;:7,&quot;state&quot;:&quot;RUNNING&quot;,&quot;worker_id&quot;:&quot;10.42.0.20:8083&quot;}],&quot;type&quot;:&quot;sink&quot;}}}

Any idea? Thanks!

答案1

得分: 0

解决方案是为Kafka Connect添加一个新的NetworkPolicy

背景

我的Redpanda Console的Pod YAML如下所示

  1. kubectl get pod redpanda-console-7fb65b7f5-87cxk -n hm-redpanda-console -o yam
  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: redpanda-console-77595c8f75-ltspx
  5. namespace: hm-redpanda-console
  6. labels:
  7. app.kubernetes.io/name: console
  8. # ...

我的Kafka Connect的NetworkPolicy YAML(由Strimzi创建)如下所示

  1. kubectl get networkpolicy hm-kafka-iot-kafka-connect-connect -n hm-kafka -o yaml
  1. apiVersion: networking.k8s.io/v1
  2. kind: NetworkPolicy
  3. metadata:
  4. name: hm-kafka-iot-kafka-connect-connect
  5. namespace: hm-kafka
  6. labels:
  7. # ...
  8. spec:
  9. podSelector:
  10. matchLabels:
  11. strimzi.io/cluster: hm-kafka-iot-kafka-connect
  12. strimzi.io/kind: KafkaConnect
  13. strimzi.io/name: hm-kafka-iot-kafka-connect-connect
  14. policyTypes:
  15. - Ingress
  16. ingress:
  17. - ports:
  18. - protocol: TCP
  19. port: 8083
  20. from:
  21. - podSelector:
  22. matchLabels:
  23. strimzi.io/cluster: hm-kafka-iot-kafka-connect
  24. strimzi.io/kind: KafkaConnect
  25. strimzi.io/name: hm-kafka-iot-kafka-connect-connect
  26. - podSelector:
  27. matchLabels:
  28. strimzi.io/kind: cluster-operator
  29. # ...

解决方案

基于我现有的由Strimzi创建的Kafka Connect的NetworkPolicy,我需要创建一个新的NetworkPolicy

> 注意:编辑现有的Kafka Connect NetworkPolicy不起作用,因为Strimzi会回滚更改。

  1. apiVersion: networking.k8s.io/v1
  2. kind: NetworkPolicy
  3. metadata:
  4. name: hm-kafka-iot-kafka-connect-network-policy
  5. namespace: hm-kafka
  6. spec:
  7. podSelector:
  8. matchLabels:
  9. strimzi.io/cluster: hm-kafka-iot-kafka-connect
  10. strimzi.io/kind: KafkaConnect
  11. strimzi.io/name: hm-kafka-iot-kafka-connect-connect
  12. policyTypes:
  13. - Ingress
  14. ingress:
  15. - ports:
  16. - protocol: TCP
  17. port: 8083
  18. from:
  19. - namespaceSelector:
  20. matchLabels:
  21. name: hm-redpanda-console
  22. podSelector:
  23. matchLabels:
  24. app.kubernetes.io/name: console

在这里,我们允许具有标签app.kubernetes.io/name: console的命名空间hm-redpanda-console中的Pod访问Kafka Connect。

如果您想允许任何命名空间中具有标签app.kubernetes.io/name: console的Pod访问Kafka Connect,您可以使用namespaceSelector: {}

  1. # ...
  2. from:
  3. - namespaceSelector: {}
  4. podSelector:
  5. matchLabels:
  6. app.kubernetes.io/name: console

现在我的Redpanda Console可以成功连接到我的Kafka Connect。

如何访问由Strimzi创建的Kafka Connect?

参考

英文:

The solution is adding a new NetworkPolcy for Kafka Connect.

Background

My Redpanda Console Pod YAML looks like

  1. kubectl get pod redpanda-console-7fb65b7f5-87cxk -n hm-redpanda-console -o yam
  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: redpanda-console-77595c8f75-ltspx
  5. namespace: hm-redpanda-console
  6. labels:
  7. app.kubernetes.io/name: console
  8. # ...

My Kafka Connect NetworkPolicy YAML (created by Strimzi) looks like

  1. kubectl get networkpolicy hm-kafka-iot-kafka-connect-connect -n hm-kafka -o yaml
  1. apiVersion: networking.k8s.io/v1
  2. kind: NetworkPolicy
  3. metadata:
  4. name: hm-kafka-iot-kafka-connect-connect
  5. namespace: hm-kafka
  6. labels:
  7. # ...
  8. spec:
  9. podSelector:
  10. matchLabels:
  11. strimzi.io/cluster: hm-kafka-iot-kafka-connect
  12. strimzi.io/kind: KafkaConnect
  13. strimzi.io/name: hm-kafka-iot-kafka-connect-connect
  14. policyTypes:
  15. - Ingress
  16. ingress:
  17. - ports:
  18. - protocol: TCP
  19. port: 8083
  20. from:
  21. - podSelector:
  22. matchLabels:
  23. strimzi.io/cluster: hm-kafka-iot-kafka-connect
  24. strimzi.io/kind: KafkaConnect
  25. strimzi.io/name: hm-kafka-iot-kafka-connect-connect
  26. - podSelector:
  27. matchLabels:
  28. strimzi.io/kind: cluster-operator
  29. # ...

Solution

Based on my exiting Kafka Connect NetworkPolicy created by Strimzi, I need create a new NetworkPolicy.

> Note: editing existing Kafka Connect NetworkPolicy does not work because Strimzi will revert the change.

  1. apiVersion: networking.k8s.io/v1
  2. kind: NetworkPolicy
  3. metadata:
  4. name: hm-kafka-iot-kafka-connect-network-policy
  5. namespace: hm-kafka
  6. spec:
  7. podSelector:
  8. matchLabels:
  9. strimzi.io/cluster: hm-kafka-iot-kafka-connect
  10. strimzi.io/kind: KafkaConnect
  11. strimzi.io/name: hm-kafka-iot-kafka-connect-connect
  12. policyTypes:
  13. - Ingress
  14. ingress:
  15. - ports:
  16. - protocol: TCP
  17. port: 8083
  18. from:
  19. - namespaceSelector:
  20. matchLabels:
  21. name: hm-redpanda-console
  22. podSelector:
  23. matchLabels:
  24. app.kubernetes.io/name: console

Here we allows pod with label app.kubernetes.io/name: console in namespace hm-redpanda-console to access Kafka Connect.

If you want to allow pod with label app.kubernetes.io/name: console in any namespace to access Kafka Connect, you can use namespaceSelector: {} by:

  1. # ...
  2. from:
  3. - namespaceSelector: {}
  4. podSelector:
  5. matchLabels:
  6. app.kubernetes.io/name: console

And now my Redpanda Console can successfully connect my Kafka Connect:

如何访问由Strimzi创建的Kafka Connect?

Reference

huangapple
  • 本文由 发表于 2023年5月7日 06:00:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/76191352.html
  • apache-kafka
  • apache-kafka-connect
  • kubernetes
  • redpanda-console
  • strimzi
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定