Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23043

Wrong master address displayed when run application in native K8s with -Dkubernetes.rest-service.exposed.type=NodePort

    XMLWordPrintableJSON

Details

    Description

      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.Into container of step 3, 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 

      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 is not accessiable.

      Attachments

        Issue Links

          Activity

            People

              idealities Shang Yuanchun
              idealities Shang Yuanchun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: