Re: How to pre upload jar file on Flink Session Cluster Instead of adding manually from the Web UI
Hi Robert,
After checking the JarRunHandler implementation, I think you requirement could be done as following steps.
1. Use the init container to download the user jars or directly baked jars into the image under path /path/of/flink-jars/flink-web-upload
2. Set the Flink configuration option "web.upload.dir: /path/of/flink-jars" for your session cluster. Please note that do not contains the "flink-web-upload" sub directory.
3. Submit the job via the curl command
curl -H "Content-Type: application/json" -X POST -d '{"entryClass":"org.apache.flink.streaming.examples.statemachine.StateMachineExample","parallelism":null,"programArgs":null,"savepointPath":null,"allowNonRestoredState":null}' http://localhost:8081/jars/StateMachineExample.jar/run
Moreover, you could also have a try with the application mode. Both the standalone[1] and native application[2] mode could meet your requirements with better isolation.