I'm trying to use JDBC Connector from a Confluent platform running in kubernetes AKS cluster. I can create the connector but i face this error:
No suitable driver found for jdbc:mariadb://maria-db-mariadb.mariadb.svc.cluster.local:3306/iotdata
I know that is because I don't have the driver installed into the connector folder but i don't know how to inserti it in the right position.
this is how i create the Kafka Connect:
apiVersion: platform.confluent.io/v1beta1
kind: Connect
metadata:
name: connect
namespace: ckafka
spec:
replicas: 1
image:
application: confluentinc/cp-server-connect:7.3.0
init: confluentinc/confluent-init-container:2.5.0
configOverrides:
server:
- config.storage.replication.factor=1
- offset.storage.replication.factor=1
- status.storage.replication.factor=1
build:
type: onDemand
onDemand:
plugins:
locationType: confluentHub
confluentHub:
- name: kafka-connect-jdbc
owner: confluentinc
version: 10.6.3
I have a Statefulset named connect and the relative pod, connect-0.
Can someone give me a step-by-step to follow for insert mariadb jdbc driver please? I am pretty new to kubernetes
CodePudding user response:
Replace confluentinc/cp-server-connect:7.3.0
with your own image, containing the plugins and JDBC drivers you want, as documented here
And get a jar from https://dev.mysql.com/downloads/connector/j/
The plugin may have downloaded correctly, but Mysql/MariaDB JDBC driver has a software license that makes it so Confluent will not include it automatically.