nick christidis
01/19/2023, 10:24 AM---- before introduction of flink kubernetes operator ----
A component in the platform I am working, is providing framework code so that a user could designate-instruct all jobs of job manager to gracefully shutdown with a savepoint.
What is doing pretty much behind the scenes is to leverage the Flink Rest API, with the following order:
1. it is calling the GET /jobs endpoint of the jobmanager to get all the job ids [see attached screen]
2. and then for every job id was stopping the job with POST /jobs/:jobid/stop [see attached screen]
So everything was working as expected.
But....
---- after introduction of flink kubernetes operator -----
because the state is passed in the yaml (eg: state: running), and get managed from Control Plane of k8s, etc.
the above does not work -- seems to getting ignored from flink kubernetes operator, so whole above mentioned mechanics
are not working in a flink kubernetes operator deployment setup.
So my question is the following:
Is there a similar API provided from kubernetes operator so that we can designate job manager to do things we wish (eg: stop jobs) and solve the above issue?Marton Balassi
01/19/2023, 12:19 PMFlinkDeployment CR that your application should be running but you cancel it manually then the operator will restart it. All job management needs to go through the operator in a case like this, please refer to https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/custom-resource/job-management/ for the details.nick christidis
01/19/2023, 12:21 PMMarton Balassi
01/19/2023, 12:26 PMFlinkDeployment CR. This essentially means that you are talking to the Kubernetes REST API server instead of the Flink JobManager REST API. We even offer a Java client, see https://github.com/apache/flink-kubernetes-operator/tree/main/examples/kubernetes-client-examples.nick christidis
01/19/2023, 1:34 PM