You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Devin Bost <de...@gmail.com> on 2022/05/18 00:28:16 UTC

Deployment on k8s via API

Hi,

I'm looking at my options for automating the deployment of Flink jobs on
k8s (ideally using application mode), and I noticed that most of the
examples of deploying Flink jobs in the docs use calls to the Flink binary,
such as:

$ ./bin/flink run-application \    --target kubernetes-application \
 -Dkubernetes.cluster-id=my-first-application-cluster \
-Dkubernetes.container.image=custom-image-name \
local:///opt/flink/usrlib/my-flink-job.jar

However, my automation function won't be running in the same container as
Flink, so I'm trying to determine what my options are here. Does Flink have
an API available for submitting jobs?
If not, how hard would it be to use the Kubernetes API to construct the
deployment configs for new Flink applications? Is there a better way?

Thanks,

Devin G. Bost

Re: Deployment on k8s via API

Posted by Yang Wang <da...@gmail.com>.
Maybe you could have a try on the flink-kubernetes-operator[1]. It is
designed for using Kubernetes CRD to manage the Flink applications.


[1].
https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-release-0.1/

Best,
Yang

Devin Bost <de...@gmail.com> 于2022年5月18日周三 08:29写道:

> Hi,
>
> I'm looking at my options for automating the deployment of Flink jobs on
> k8s (ideally using application mode), and I noticed that most of the
> examples of deploying Flink jobs in the docs use calls to the Flink binary,
> such as:
>
> $ ./bin/flink run-application \    --target kubernetes-application \    -Dkubernetes.cluster-id=my-first-application-cluster \    -Dkubernetes.container.image=custom-image-name \    local:///opt/flink/usrlib/my-flink-job.jar
>
> However, my automation function won't be running in the same container as
> Flink, so I'm trying to determine what my options are here. Does Flink have
> an API available for submitting jobs?
> If not, how hard would it be to use the Kubernetes API to construct the
> deployment configs for new Flink applications? Is there a better way?
>
> Thanks,
>
> Devin G. Bost
>