Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.10.0
-
Kubernetes for Docker on MacOS
Description
In my setup the ingress has a hostname but no IP here: https://github.com/apache/flink/blob/f49e632bb290ded45b320f5d00ceaa1543a6bb1c/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java#L199
This means that when I try to use the Kubernetes Executor I will get
Exception in thread "main" java.lang.NullPointerException: Address should not be null. at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:75) at org.apache.flink.kubernetes.kubeclient.Endpoint.<init>(Endpoint.java:33) at org.apache.flink.kubernetes.kubeclient.Fabric8FlinkKubeClient.getRestEndpoint(Fabric8FlinkKubeClient.java:209) at org.apache.flink.kubernetes.KubernetesClusterDescriptor.lambda$createClusterClientProvider$0(KubernetesClusterDescriptor.java:82) at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:106) at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:53) at org.apache.flink.client.deployment.AbstractSessionClusterExecutor.execute(AbstractSessionClusterExecutor.java:60) at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1741) at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1712) at org.apache.flink.streaming.examples.statemachine.StateMachineExample.main(StateMachineExample.java:169)
I think we can just check if a hostname is set and use that if there is no IP.