Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9953 Active Kubernetes integration
  3. FLINK-15251

Fabric8FlinkKubeClient doesn't work if ingress has hostname but no IP

    XMLWordPrintableJSON

    Details

      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.

        Attachments

          Activity

            People

            • Assignee:
              wangyang0918 Yang Wang
              Reporter:
              aljoscha Aljoscha Krettek
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m