You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Shang Yuanchun (Jira)" <ji...@apache.org> on 2021/06/20 05:30:00 UTC

[jira] [Commented] (FLINK-23043) Wrong master address displayed when run application in native K8s with -Dkubernetes.rest-service.exposed.type=NodePort

    [ https://issues.apache.org/jira/browse/FLINK-23043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17366105#comment-17366105 ] 

Shang Yuanchun commented on FLINK-23043:
----------------------------------------

I've provided a pull request: https://github.com/apache/flink/pull/16209

> Wrong master address displayed when run application in native K8s with -Dkubernetes.rest-service.exposed.type=NodePort
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-23043
>                 URL: https://issues.apache.org/jira/browse/FLINK-23043
>             Project: Flink
>          Issue Type: Bug
>          Components: Deployment / Kubernetes
>    Affects Versions: 1.13.1
>            Reporter: Shang Yuanchun
>            Priority: Major
>              Labels: pull-request-available
>
> When running with Native Kubernetes in application mode, and Fabric8 Kubernetes client is configured by Service account, if you specify -Dkubernetes.rest-service.exposed.type=NodePort, the IP address in JobManager Web Interface url displayed is not master node, but instead it is the ClusterIP of service kubernetes.default.svc.
> Steps to reproduce:
> 1.Start a Kubernetes cluster
> 2.Bind ClusterRole edit to service account: default (for simplicity here)
> 3.Run kubectl run flink --image flink:latest sleep inf
> 4.In container, run 
> ./bin/flink run-application --target kubernetes-application -Dkubernetes.cluster-id=my-application-cluster -Dkubernetes.container.image=flink:latest -Dkubernetes.rest-service.exposed.type=NodePort local:///opt/flink/examples/streaming/TopSpeedWindowing.jar
> Here it will say that JobManager Web interface is at [http://10.96.0.1:32333 |http://10.96.0.1:32368/]
> But actually 10.96.0.1 here is the environment variable of KUBERNETES_SERVICE_HOST, and it is the ClusterIP of service kubernetes.default.svc, not the address of master node, so [http://10.96.0.1:32333|http://10.96.0.1:32368/] is not accessiable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)