We are using flink operator, when we deploy flinkd...
# troubleshooting
k
We are using flink operator, when we deploy flinkdeployment, Job Manager, taskmanager and service(UI port:8081) for job manager is automatically created. My question is how to modify the default port and how to add additional ports in the job manager service?
m
You can add
rest.port
to the
flinkConfiguration
section.
You can use the podTemplate to open up additional ports on the JM/TM pods
k
Right now I'm manually creating the service for TM. Does TM service also automatically gets created like JM?
m
No TMs don't directory exposed as a service.
👍 1
k
Okay, then thanks
I have added the additional ports in JM pod template but it doesn't showup in the jm-rest kubenetes service (only rest port 8081 is showing) what i'm missing here
z
@kingsathurthi I am just thinking outloud, but maybe you can create a ConfigMap containing the ports you want to use and mount it as a volume in the Job Manager pod... then, you can set the ports using environment variables in the Job Manager container... maybe in this way, you can easily change the ports without having to rebuild the images
and related to your last note: maybe you also need to update the associated Kubernetes Service resource to make those ports accessible.. and maybe you already done this, but after updating the Service resource, you need to apply the changes to the cluster.. the last only thing is that make sure the additional ports are free, and the JobManager is configured to listen on those ports
k
There is no yaml for that associated JM kubernetes service available, it is creating under the hood
m
@kingsathurthi the podTemplate only controls the pods for JM/TM. Not sure what you're trying to achieve here, but this is not a common request for flink applications to expose extra ports as service. Help me understand what you're trying to achieve and we may find a solution for that.
k
I want to expose the metrics of JM and TM using this port 9250. For TM I'm manually creating the Kubernetes service and exposing metrics port(9250) and other port so its working . But for JM I'm unable to expose the 9250 port because by defalut kubernetes service for JM is automatically getting created
Hi @Matyas Orhidi I tried adding additional port (metric port for prometheus) in JM/TM pod and container port port is working but JM kubernetes service only exposing the
rest.port: 8081
not the port I added (port named metrics)