Hello team,

I'm currently deploying a Flink session cluster on Kubernetes using the
Flink Kubernetes operator. My Flink job, which utilizes the DataStream API
for its logic, requires several external dependencies. , so I've used an
init container to copy all necessary jars to a /mnt/external-jars path,
which is mounted as expected.

To include these external jars in my job, I've added them to the
pipeline.classpaths property in my configuration as follows:

pipeline.classpaths:
file:///mnt/external-jars/mysql-connector-java-8.0.28.jar;file:///mnt/external-jars/flink-connector-kafka-1.17.2.jar;file:///mnt/external-jars/flink-shaded-guava-30.1.1-jre-16.2.jar;file:///mnt/external-jars/kafka-clients-3.4.1.jar

Despite this setup, when submitting my job, I encounter a
java.lang.ClassNotFoundException for com.mysql.jdbc.Driver. This leads me
to question:

Is my understanding correct that the pipeline.classpaths property is
intended for loading external dependencies in this manner?
Does the Flink Kubernetes operator support the pipeline.classpaths
property, or are there known limitations?
Are there any alternative approaches or workarounds within the Kubernetes
operator context to ensure external dependencies are recognized and loaded
correctly by the Flink job?
Any insights or suggestions to resolve this issue would be greatly
appreciated.

Thank you in advance for your help!

Reply via email to