Hi Everyone, I am deploying a Flink Application i...
# troubleshooting
c
Hi Everyone, I am deploying a Flink Application in a Kuberenetes environment in session mode, I followed the documentation and deployed Job-manager, Task-managers as separate deployments successfully and they are running successfully. Following the below documentation and deployed the job-manager using "jobmanager-session-deployment-non-ha.yaml" and task-manager "taskmanager-session-deployment.yaml" https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/standalone/kubernetes/ -> job-manager is running in an independent pod and exposing rpc port on 6123 (i.e flink-jobmanager:6123), and task-manager is running in another pod and able to connect to this job-manager. Here are the steps I followed to deploy my custom job. 1. I build my customer job jar(custom-app.jar), copied into /opt/flink/userlib/ and created a docker image called "custom-job:test". 2. and I used below inline deployment config to deploy the job-submitter pod and use this to submit the job to a job manager which is running on 6123 rpc port in a different pod. kubectl run -i --tty --rm flink-job-submitter --image=custom-job:test --restart=Never -- /bin/bash 3. now I am in the flink-job-submitter pod and trying to submit the job using below command. flink run -m flink-jobmanager:6123 -c com.custom.job.CustomJobClass /opt/flink/usrlib/custom-app.jar But it's not getting submitted, and I do not see any error except bellow message from job-manager, and I don't see any error or message from task-manager. 2024-04-14 113149,999 INFO org.apache.pekko.remote.transport.ProtocolStateActor [] - No response from remote for inbound association. Handshake timed out after [20000 ms]. My first question is " am I doing the right thing to deploy flink job in a session mode cluster in kubernetes". Can someone help me on how to deploy the flink job on kubernetes session cluster or it would be great if you provide with some sample deployment file as well.
I am following exactly the same documentation, I don't have any webUI/Rest interface to submit the job, I want to submit it from kubernetes yaml file and submit from kubernetes deploymnet file. https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/standalone/kubernetes/
I am struggling on this for a week now, it would be great if someone can suggest me the right approach to deploy the session mode flink job, even an example.
g
I recommend using the Flink Kubernetes operator for simplicity
c
@Gyula Fóra Thank you very much for your response, could you please help me with an example if possible, or direct me to any documentation if present.
c
Thank you VuLe for your response, I have tried Flink operator, in which I am not able to submit my custom job part of a jar file, I am running job manager and taskmanager together with below yaml /basic-session-deployment-only.yaml and now I am trying to use https://github.com/apache/flink-kubernetes-operator/blob/main/examples/basic-session-job-only.yaml here I don't find an option to pass my custom jar file or load custom container too. is there a way to include container in this yaml so that I can refer the user jar from the container instead of loading from web location. using: jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.16.1/flink-examples-streaming_2.12-1.16.1-TopSpeedWindowing.jar