Hi, has anyone figured out a way to deploy job usi...
# troubleshooting
s
Hi, has anyone figured out a way to deploy job using Flink operator by pulling from private repository and K8s ImageSecrets? is using side-car container option if I do not want to package with cluster image?
g
You can have anything in sidecar/init containers. You can set this up with the podTemplate functionality
s
yes, looks like that is the only option I have. I am trying that. I hope we have this feature in future releases. Thanks
g
what feature are you looking for exactly?
did you try this? kubernetes.container.image.pull-secrets
s
I have this used for flink-cluster in FlinkDeployment but can we use the same for FlinkSessionJob to pull jars?
g
Not sure what do jars have to do with container images, it’s a completely different problem/question
The operator generally loads jars from the filesystem from a mounted volume for example or through http
s
may be I was hoping image or jar can be pulled the same way. May be my understanding is wrong.
g
you can also mount the jars directly to the session cluster and use that
s
ok, yeah going to try that
Hi, I am able to mount and download the jar from remote repo in FlinkDeployment -> job or task manager -> podtemplate -> initContainers but when I put that path in FlinkSessionJob, it is unable to find that path. I am not sure how flinkoperator looks up this path. I tried going through the code. For ex:
Copy code
---
apiVersion: flink.apache.org/v1beta1
kind: FlinkSessionJob
metadata:
  name: job1
spec:
  deploymentName: session-cluster
  job:
    jarURI: file:///opt/flink/job.jar
    parallelism: 4
    upgradeMode: savepoint
(edited)
Copy code
caused by: java.io.FileNotFoundException: /opt/flink/job.jar (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at org.apache.flink.core.fs.local.LocalDataInputStream.<init>(LocalDataInputStream.java:50)
at org.apache.flink.core.fs.local.LocalFileSystem.open(LocalFileSystem.java:134)
at org.apache.flink.kubernetes.operator.artifact.FileSystemBasedArtifactFetcher.fetch(FileSystemBasedArtifactFetcher.java:44)
at org.apache.flink.kubernetes.operator.artifact.ArtifactManager.fetch(ArtifactManager.java:63)
at org.apache.flink.kubernetes.operator.service.AbstractFlinkService.uploadJar(AbstractFlinkService.java:707)
at org.apache.flink.kubernetes.operator.service.AbstractFlinkService.submitJobToSessionCluster(AbstractFlinkService.java:212)
at org.apache.flink.kubernetes.operator.reconciler.sessionjob.SessionJobReconciler.deploy(SessionJobReconciler.java:73)
at org.apache.flink.kubernetes.operator.reconciler.sessionjob.SessionJobReconciler.deploy(SessionJobReconciler.java:44)
at org.apache.flink.kubernetes.operator.reconciler.deployment.AbstractFlinkResourceReconciler.reconcile(AbstractFlinkResourceReconciler.java:120)
at org.apache.flink.kubernetes.operator.controller.FlinkSessionJobController.reconcile(FlinkSessionJobController.java:109)
all the examples I found are referring to remote public repository for Session cluster and image filepath for application cluster. What am I missing?
@Gyula Fóra Can I raise this as a FLIP?
g
If you mean JIRA then yes
w
Hi there, i think i hit the same issue. (No such file or directory, jar not found issue) I have my jar file inside the docker image, everything was fine when I submit the
job
together with
FlinkDeployment
, but when I submit the
job
with
FlinkSessionJob
, it reported file not found exception. Wondering what made this difference? I aware that in
FlinkDeployment
the
jarURI
starts with
local:///
, however in
FlinkSessionJob
local
was not supported...
s
yes, even if you have the job in the image, in FlinkSessionJob, operator does not know where is the this path. Only direct download of the jar from remote public repository works.
w
Just for an update, in my case, this has been resolved by uploading the jar file to a public bucket. Point the jarURI to
https://(path to the jar file)
.
s
yeah, my jars our in our internal private repository that wouldn’t work.
🥲 1
v
Hi, I have the same issue with local jar. Have you found a workaround?
w
I just moved on to use FlinkDeployment (Application mode?) mode instead.
🙏 1