-
Hello! I've been trying to setup a mongo-db-sink connector in Kubernetes but I am getting some errors. How I did it
Dockerfile:
Inside ./connectors I have downloaded The following is my kafka-connect-cluster.yaml apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnect
metadata:
name: kafka-connect-cluster
annotations:
strimzi.io/use-connector-resources: "true"
spec:
image: .../strimzi/kafka_connect:3.1.0 # This is the image I built in the step before
template:
pod:
imagePullSecrets:
- name: <hidden>
version: 3.1.0
replicas: 1
bootstrapServers: <hidden>
config:
group.id: connect-cluster
offset.storage.topic: strimzi-connect-cluster-offsets
config.storage.topic: strimzi-connect-cluster-configs
status.storage.topic: strimzi-connect-cluster-status My mongodb-sink-connector.yaml apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnector
metadata:
name: mongodb-sink-connector
labels:
strimzi.io/cluster: kafka-connect-cluster
spec:
class: com.mongodb.kafka.connect.MongoSinkConnector
tasksMax: 2
config:
topics: beta-topic
connection.uri: mongo.mongo.database.svc.cluster.local/?&replicaSet=rs0
database: kafka
collection: test-backup
post.processor.chain: com.mongodb.kafka.connect.sink.processor.DocumentIdAdder,com.mongodb.kafka.connect.sink.processor.KafkaMetaAdder
key.converter: org.apache.kafka.connect.storage.StringConverter
key.converter.schemas.enable: false
value.converter: org.apache.kafka.connect.json.JsonConverter
value.converter.schemas.enable: false This is what I get in my
And my apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: messaging
spec:
kafka:
version: 3.1.0 #Apache Kafka version
replicas: 3
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
- name: external
port: 9094
type: nodeport
tls: false
config:
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
transaction.state.log.min.isr: 1
default.replication.factor: 1
min.insync.replicas: 1
inter.broker.protocol.version: "3.1"
storage:
type: jbod
volumes:
- id: 0
type: persistent-claim
size: 100Gi
deleteClaim: false
zookeeper:
replicas: 3
storage:
type: persistent-claim
size: 100Gi
deleteClaim: false
entityOperator:
topicOperator: {}
userOperator: {} Any idea of what I am doing wrong? I found this other issue which is similar, and it seems it should be fixed in 0.29 but that's what I am using and I am still hitting the error. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Without a full logs, it is absolutely not clear what is causing this and where it is happening. The issue you linked is about the Cluster operator but you say your log snippet is from Connect, so it has probably nothing to do with it (+ it is not fixed in 0.29 - it will be fixed only in 0.30.0) |
Beta Was this translation helpful? Give feedback.
Without a full logs, it is absolutely not clear what is causing this and where it is happening. The issue you linked is about the Cluster operator but you say your log snippet is from Connect, so it has probably nothing to do with it (+ it is not fixed in 0.29 - it will be fixed only in 0.30.0)