Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-21361

fabric8 kubernetes-client fails to connect to openshift

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.8.0
    • 4.8.2, 4.9.0
    • camel-jbang
    • None
    • Unknown

    Description

      jbang camel kubernetes run timer-log-route.yaml --logs \
             --gav=examples:timer-log:1.0.0 \
             --image-registry image-registry.openshift-image-registry.svc:5000 \
             --trait container.imagePullPolicy=IfNotPresent \
             --cluster-type openshift \
             --runtime=quarkus
      

      This happens with the latest io.fabric8:kubernetes-client-6.13.4

      https://mvnrepository.com/artifact/io.fabric8/kubernetes-client/6.13.4

      Run: kubectl get pod -l app.kubernetes.io/name=timer-log
      Exception in thread "main" java.util.ServiceConfigurationError: io.fabric8.kubernetes.api.model.KubernetesResource: io.fabric8.kubernetes.api.model.LimitRange not a subtype
      	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
      	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
      	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
      	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
      	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
      	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
      	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
      	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
      	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
      	at io.fabric8.kubernetes.internal.KubernetesDeserializer$Mapping.registerClassesFromClassLoaders(KubernetesDeserializer.java:215)
      	at io.fabric8.kubernetes.internal.KubernetesDeserializer.<init>(KubernetesDeserializer.java:90)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization.getKubernetesDeserializer(KubernetesSerialization.java:153)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization.access$000(KubernetesSerialization.java:66)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization$1.deserializerInstance(KubernetesSerialization.java:105)
      	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.deserializerInstance(DefaultDeserializationContext.java:245)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache.findDeserializerFromAnnotation(DeserializerCache.java:487)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:382)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:317)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:284)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:174)
      	at com.fasterxml.jackson.databind.DeserializationContext.findNonContextualValueDeserializer(DeserializationContext.java:659)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:552)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:347)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:284)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:174)
      	at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:636)
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:190)
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:30)
      	at com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:851)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:563)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:347)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:284)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:174)
      	at com.fasterxml.jackson.databind.DeserializationContext.findNonContextualValueDeserializer(DeserializationContext.java:659)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:552)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:347)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:284)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:174)
      	at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:669)
      	at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:5048)
      	at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4629)
      	at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4577)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization.parseYaml(KubernetesSerialization.java:277)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization.unmarshal(KubernetesSerialization.java:255)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization.unmarshal(KubernetesSerialization.java:345)
      	at io.fabric8.kubernetes.client.utils.KubernetesSerialization.unmarshal(KubernetesSerialization.java:330)
      	at io.fabric8.kubernetes.client.utils.Serialization.unmarshal(Serialization.java:186)
      	at io.fabric8.kubernetes.client.internal.KubeConfigUtils.parseConfigFromString(KubeConfigUtils.java:47)
      	at io.fabric8.kubernetes.client.Config.loadFromKubeconfig(Config.java:906)
      	at io.fabric8.kubernetes.client.Config.tryKubeConfig(Config.java:869)
      	at io.fabric8.kubernetes.client.Config.autoConfigure(Config.java:305)
      	at io.fabric8.kubernetes.client.Config.<init>(Config.java:456)
      	at io.fabric8.kubernetes.client.ConfigBuilder.build(ConfigBuilder.java:60)
      	at io.fabric8.kubernetes.client.KubernetesClientBuilder.build(KubernetesClientBuilder.java:72)
      	at org.apache.camel.dsl.jbang.core.commands.kubernetes.KubernetesHelper.getKubernetesClient(KubernetesHelper.java:78)
      	at org.apache.camel.dsl.jbang.core.commands.kubernetes.KubernetesBaseCommand.client(KubernetesBaseCommand.java:94)
      	at org.apache.camel.dsl.jbang.core.commands.kubernetes.KubernetesBaseCommand.client(KubernetesBaseCommand.java:67)
      	at org.apache.camel.dsl.jbang.core.commands.kubernetes.KubernetesRun.waitForRunningPod(KubernetesRun.java:458)
      	at org.apache.camel.dsl.jbang.core.commands.kubernetes.KubernetesRun.doCall(KubernetesRun.java:299)
      

      Attachments

        Issue Links

          Activity

            People

              tdiesler Thomas Diesler
              tdiesler Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: