wangyang0918 commented on a change in pull request #14692:
URL: https://github.com/apache/flink/pull/14692#discussion_r560094753



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesClusterDescriptor.java
##########
@@ -125,6 +121,16 @@ public String getClusterDescription() {
         };
     }
 
+    private String getWebMonitorAddress(Configuration configuration) throws 
Exception {
+        HighAvailabilityServicesUtils.AddressResolution resolution =
+                
HighAvailabilityServicesUtils.AddressResolution.TRY_ADDRESS_RESOLUTION;
+        if 
(configuration.get(KubernetesConfigOptions.REST_SERVICE_EXPOSED_TYPE)
+                == KubernetesConfigOptions.ServiceExposedType.ClusterIP) {
+            resolution = 
HighAvailabilityServicesUtils.AddressResolution.NO_ADDRESS_RESOLUTION;
+        }
+        return 
HighAvailabilityServicesUtils.getWebMonitorAddress(configuration, resolution);
+    }

Review comment:
       The Flink application submission could happen in or out of the K8s 
cluster. The reason why we set the `RestOptions.ADDRESS` to the namespaced 
service is that it could be directly used in the K8s cluster. However, when the 
submission happens out of the K8s cluster, the namespaced service could not be 
used to contact with the cluster. 
   
   In such situation, users usually need to create a ingress for the 
communication.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to