Reputation: 421
I'm deploying KafkaCluster, KafkaConnect on K8s by using Strimzi.
I'm trying to setting KafkaConnector which connects to Postgres DB.
These are my steps:
Build a new KafkaConnect from this image 'quay.io/strimzi/kafka:0.26.1-kafka-3.0.0'. This new image has plugin which I download from this link 'https://debezium.io/documentation/reference/stable/connectors/postgresql.html#postgresql-deployment'
I run this new image on K8s, then exec into KafkaConnect container. It has plugin correctly ('/opt/kafka/plugins/debezium/debezium-connector-postgres'):
I create KafkaConnector which refers to class 'io.debezium.connector.postgresql.PostgresConnector':
kind: "KafkaConnector"
metadata:
name: dev-approvalflowservice-connector
labels:
strimzi.io/cluster: postgres-connect-cluster-1
spec:
class: io.debezium.connector.postgresql.PostgresConnector
tasksMax: 2
config:
database.hostname: 10.14.101.204
database.port: "5432"
database.user: "debezium"
database.password: "debezium"
database.dbname: "approvalflowservice"
database.server.name: "approvalflowservice"
plugin.name: "pgoutput"
slot.name: "approvalflowserviceslot"
truncate.handling.mode: "include"
table.include.list: "public.approval_flow"
Update
Thank you all.
Upvotes: 0
Views: 1322
Reputation: 191743
In your logs, you have
Loading plugin from: /opt/kafka/plugins/debezium
But, since your plugin is installed into a subfolder, no Postgres class is being listed as loaded.
Make sure that the plugin path only has one folder between the path you've defined and where the JARs are available. e.g. install to /opt/kafka/plugins/debezium-connector-postgres
You can also issue a GET /connector-plugins
HTTP request to the Connect API to list the available connectors for the cluster before you create one.
Upvotes: 0