[ https://issues.apache.org/jira/browse/FLINK-16601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17059932#comment-17059932 ]
Canbin Zheng commented on FLINK-16601: -------------------------------------- Hi [~fly_in_gis]. Internally we use the KubernetesClient to list the Nodes and randomly select one of them, this solution works well both for the managed and unmanaged Kubernetes clusters. And I would like to contribute it back. For your concern of inconvenience for unmanaged Kubernetes clusters, actually, it's not the typical usage of the NodePort Service. One could use an LB Service or Ingress to access the Flink cluster from outside of the Kubernetes cluster. > Corret the way to get Endpoint address for NodePort rest Service > ---------------------------------------------------------------- > > Key: FLINK-16601 > URL: https://issues.apache.org/jira/browse/FLINK-16601 > Project: Flink > Issue Type: Bug > Components: Deployment / Kubernetes > Affects Versions: 1.10.0 > Reporter: Canbin Zheng > Priority: Major > Fix For: 1.11.0 > > > Currently, if one sets the type of the rest-service to {{NodePort}}, then the > way to get the Endpoint address is by calling the method of > 'KubernetesClient.getMasterUrl().getHost()'. This solution works fine for the > case of the non-managed Kubernetes cluster but not for the managed ones. > For the managed Kubernetes cluster setups, the Kubernetes masters are > deployed in a pool different from the Kubernetes nodes and do not expose > NodePort for a NodePort Service. -- This message was sent by Atlassian Jira (v8.3.4#803005)