Hi Elkhan, I confirm that the FlinkSQL Client is communicating with JM via Rest endpoint. After I changed the “rest.port”, the sql client thrown exception: "[ERROR] Could not execute SQL statement. Reason: java.net.ConnectException: Connection refused”.
So for your case, since Flink will create a Kubernetes service to expose rest service if you are running on native Kubernetes mode, to make sql-client connect to JM, you need to set: 1. If you created NodePort type rest service: jobmanager.rpc.address: <node address of jm> rest.port: <node port of NodePort service> 2. Or if you created LoadBalancer type rest service: jobmanager.rpc.address: <external address of LoadBalancer service> rest.port: <port of load balancer service, default 8081> More info about kubernetes service can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types Hopes my reply help you. > On 3 Mar 2022, at 6:00 PM, yu'an huang <h.yuan...@gmail.com> wrote: > > Hi Elkhan, > > Except for JM have an external IP address, I think the port 6123 also need to > be opened. You may need to set a host port for 6123 in JM pod or expose this > port by Kubernetes service. > But I am not sure whether the sql-client communicate with JM via Rest > endpoint or RPC port. Hopes someone could answer it. > > > > >> On 3 Mar 2022, at 6:20 AM, Elkhan Dadashov <elkhan.dadas...@gmail.com> wrote: >> >> Hi Flink users, >> >> Wanted to check if any of you tried to run the local FlinkSQL client against >> JobManager running in the Kubernetes environment. >> >> For local FlinkSQL Client and local Flink cluster we set these params: >> >> jobmanager.rpc.address: localhost >> jobmanager.rpc.port: 6123 >> >> To make it work, Is the only requirement for JM (running in remote >> Kubernetes env) to have an external IP address? >> >> Does port 6123 on the JM pod also need to be open to the external world for >> FlinkSQL client to work? (Assuming FlinkSQL Client is not communicating with >> JM via Rest endpoint) >> >> Thank you. >