[ 
https://issues.apache.org/jira/browse/FLINK-15251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yang Wang updated FLINK-15251:
------------------------------
        Parent: FLINK-9953
    Issue Type: Sub-task  (was: Bug)

> Fabric8FlinkKubeClient doesn't work if ingress has hostname but no IP
> ---------------------------------------------------------------------
>
>                 Key: FLINK-15251
>                 URL: https://issues.apache.org/jira/browse/FLINK-15251
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Deployment / Kubernetes
>    Affects Versions: 1.10.0
>         Environment: Kubernetes for Docker on MacOS
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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
> {code}
> 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)
> {code}
> I think we can just check if a hostname is set and use that if there is no IP.



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

Reply via email to