Dear Team,
I have raised a jira [FLINK-40516] Needed to support network policy in
Jobmanager and Task Manager - ASF
Jira<https://issues.apache.org/jira/browse/FLINK-40516>. I am using flink
inside a Kubernetes pod and need to apply newtwork policy but random ports are
getting opened although I had provided some configuration in conf.yaml as well.
The example is shown below:
bash-4.4$ ss -nap | grep LISTEN
tcp LISTEN 0 50 :9249
*:
users[cid:[email protected]]("java",pid=224,fd=271))
tcp LISTEN 0 4096 :8081
*:
users[cid:[email protected]]("java",pid=224,fd=293))
tcp LISTEN 0 4096 :6123
*:
users[cid:[email protected]]("java",pid=224,fd=265))
tcp LISTEN 0 1000 :6124
*:
users[cid:[email protected]]("java",pid=224,fd=268))
tcp LISTEN 0 4096 :35669
*:
users[cid:[email protected]]("java",pid=224,fd=286)) - random port
in taskmanager:
bash-4.4$ ss -nap |grep LISTEN
tcp LISTEN 0 50 :9249
*: users[cid:[email protected]]("java",pid=358,fd=277))
tcp LISTEN 0 4096 :41355
*: users[cid:[email protected]]("java",pid=358,fd=300))
- random port
tcp LISTEN 0 4096 :6121
*: users[cid:[email protected]]("java",pid=358,fd=313))
tcp LISTEN 0 4096 :6122
*: users[cid:[email protected]]("java",pid=358,fd=275))
Earlier two random ports were getting opened but after following
configurations, it reduces to one:
jobManagerConfig:
pekko.ask.timeout: "120s"
client.timeout: "120s"
state.checkpoints.num-retained: 1
metrics.internal.query-service.port: "6126" # ← PIN the metric query
service
taskManagerConfig:
taskmanager.data.port: "6121" # ← PIN the data shuffle port
metrics.internal.query-service.port: "6126"
Thanks & Regards
Taranpreet Kaur