spring-cloud-deployer icon indicating copy to clipboard operation
spring-cloud-deployer copied to clipboard

NoSuchMethodError io.fabric8.kubernetes.api.model.HTTPGetActionBuilder.withNewPort(java.lang.Integer)

Open zargarf opened this issue 2 years ago • 1 comments
trafficstars

Hi

I am using a spring-cloud-task taskLauncherSink to launch a pod via spring-cloud-deployer-kubernetes in kubernetes 1.25. However after upgrading to use spring-boot-3, spring-cloud-task 3.3 and spring-cloud-deployer 2.8.3, I get the following exception when it attempts to launch the task:

Caused by: java.lang.NoSuchMethodError: 'io.fabric8.kubernetes.api.model.HTTPGetActionFluent io.fabric8.kubernetes.api.model.HTTPGetActionBuilder.withNewPort(java.lang.Integer)'
	at org.springframework.cloud.deployer.spi.kubernetes.HttpProbeCreator.create(HttpProbeCreator.java:65)
	at org.springframework.cloud.deployer.spi.kubernetes.ProbeCreatorFactory.createStartupProbe(ProbeCreatorFactory.java:32)
	at org.springframework.cloud.deployer.spi.kubernetes.DefaultContainerFactory.configureStartupProbe(DefaultContainerFactory.java:245)
	at org.springframework.cloud.deployer.spi.kubernetes.DefaultContainerFactory.create(DefaultContainerFactory.java:183)
	at org.springframework.cloud.deployer.spi.kubernetes.AbstractKubernetesDeployer.createPodSpec(AbstractKubernetesDeployer.java:211)
	at org.springframework.cloud.deployer.spi.kubernetes.KubernetesTaskLauncher.launch(KubernetesTaskLauncher.java:247)
	at org.springframework.cloud.deployer.spi.kubernetes.KubernetesTaskLauncher.launch(KubernetesTaskLauncher.java:123)
	at org.springframework.cloud.task.launcher.TaskLauncherSink.launchTask(TaskLauncherSink.java:72)

The task launching used to work when using the 2.0.5.RELEASE of spring-cloud-deployer-kubernetes and v 4.7.2 of the kubernetes client with 4.6.0 of the kubernetes model. I assume I have some mismatch between dependency versions, but am unsure what combo should work now

zargarf avatar Aug 04 '23 11:08 zargarf

Hi Spring Boot 3.x and Spring Cloud Task 3.x are only supported in the SCDF 2.11.x line - which is in RC1 release currently. The versions are as follows:

  • k8s client 5.12.4
  • deployer 2.9.0-RC1
  • k8s model (whichever version the client supports)

Try these and please report how it goes.

onobc avatar Aug 29 '23 14:08 onobc

Closing due to inactivity. If you feel this was closed in error please reopen the issue. Thank you!

cppwfs avatar Apr 22 '24 19:04 cppwfs