Flink: How to use zookeeper when deployed in k8s?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Flink: How to use zookeeper when deployed in k8s?

sora
Hello,
I encountered a problem when deploying flink to k8s.
When high-availability: zookeeper in flink-conf.yaml is set, a random port will be used instead of the config port. 
But this port is not exposed in k8s, and all taskmanager can not connect to jobmanager.
How can I solve this?
One solution is to use the HostNetwork, but this is not exactly what I want.

Looking forward to your kind reply.
Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Flink: How to use zookeeper when deployed in k8s?

Ufuk Celebi
You can set

jobmanager.rpc.address: jmServiceName
high-availability.jobmanager.port: 6123

in flink-conf.yaml and expose the port in the JobManager service.

– Ufuk

On Mon, Apr 1, 2019 at 9:29 AM sora <[hidden email]> wrote:

>
> Hello,
> I encountered a problem when deploying flink to k8s.
> When high-availability: zookeeper in flink-conf.yaml is set, a random port will be used instead of the config port.
> But this port is not exposed in k8s, and all taskmanager can not connect to jobmanager.
> How can I solve this?
> One solution is to use the HostNetwork, but this is not exactly what I want.
>
> Looking forward to your kind reply.
> Thanks.
>