Hi Team, I am using k8 flink operator, and testing...
# troubleshooting
s
Hi Team, I am using k8 flink operator, and testing with below manifest. On submitting the
flinkdeployment
manifest i see the job created and task running. But how can i resubmit the job as it says the configuration is unchanged on resubmitting the manifest. Do we have to always delete the flinkdeployment before resubmitting? Also I see the jobmanager continuously run even after the task is complete, is this expected behavior?
Copy code
apiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkDeployment
metadata:
  name: wordcount
  namespace: flink
spec:
  image: flink:scala_2.12-java17
  flinkVersion: v1_17
  ingress:
    template: "{{name}}.{{namespace}}.<http://flink.k8s.io|flink.k8s.io>"
  flinkConfiguration:
    taskmanager.numberOfTaskSlots: "2"
  serviceAccount: flink
  jobManager:
    resource:
      memory: "2048m"
      cpu: 1
  taskManager:
    resource:
      memory: "2048m"
      cpu: 1
  job:
    jarURI: local:///opt/flink/examples/streaming/WordCount.jar
    parallelism: 2
    state: running
s
I’m new to Flink, so my answer might not be the most accurate one but here is what I’m doing. • I use FlinkDeployment (without the job section) which deploys the job/resource manager and the webui • I uses the FlinkSessionJob, to “submit the job” which will start its own Task Manager. You can have multiple FlinkSessionJobs per FlinkDeployment. So, when I need to resubmit the job (update or upgrade it), the FlinkSessionJob resource is the only one that gets recycle. This works for my uses cases but more than happy to hear from other people.