I'm busy learning kafka, specifically the downstream element of using a sink connector (jdbc) to send data from a kafka topic to mysql.
I've build an image from the confluent kafka-connect-base image with the jdbc connector and the mysql jdbc driver, in a Dockerfile like this:
FROM confluentinc/cp-kafka-connect-base
RUN confluent-hub install --no-prompt confluentinc/kafka-connect-jdbc:5.4.1
ENV MYSQL_DRIVER_VERSION 5.1.39
RUN curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz" \
| tar -xzf - -C /usr/share/java/kafka/ --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar
I'll be honest, I'm getting a little lost in the documentation and I'm getting to the point where I want to include the config for the sink, but I have no idea how to include that or where to copy it to. I have create the sink configuration file, but not sure where to put it. As part of the image build, or when running the kafka-connect container?
The end game for this is the create a helm deployment for this connector, but I'm not there yet.
Any help would be greatly appreciated as I learn all about Kafka and Kafka Connect.