If you want to use the RestClusterClient to do the job submission and lifecycle management, the implementation in the flink-kubernetes-operator[1] project may give you some insights.
You could also use /jars/:jarid/run[2] to run a Flink job. It is a pure HTTP interface. [1]. https://github.com/apache/flink-kubernetes-operator/blob/main/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/FlinkService.java#L126 [2]. https://nightlies.apache.org/flink/flink-docs-master/docs/ops/rest_api/#jars-jarid-run Best, Yang Almog Rozencwajg <almog.rozencw...@niceactimize.com> 于2022年3月6日周日 15:29写道: > Hi, > > > > We deploy a Flink session cluster on Kubernetes. > > We want to submit jobs via java application using the REST API > https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/ops/rest_api/ > . > > I'm trying to use the RestClusterClient which comes with the flink-clients > module but I couldn't find any examples in the documentation. > > What is the correct way to submit a job to a native Kubernetes session > cluster using the REST API, work with the RestClusterClient or can we use > any other REST client? > > Is there an example of how to work with the RestClusterClient? > > > > Thanks, > > Almog > > > Confidentiality: This communication and any attachments are intended for > the above-named persons only and may be confidential and/or legally > privileged. Any opinions expressed in this communication are not > necessarily those of NICE Actimize. If this communication has come to you > in error you must take no action based on it, nor must you copy or show it > to anyone; please delete/destroy and inform the sender by e-mail > immediately. > Monitoring: NICE Actimize may monitor incoming and outgoing e-mails. > Viruses: Although we have taken steps toward ensuring that this e-mail and > attachments are free from any virus, we advise that in keeping with good > computing practice the recipient should ensure they are actually virus free. >