Open KaanSimsek opened 1 month ago
The version of the Kubernetes Client you're using is not compatible with the version of Spring Cloud Kubernetes defined in its BOM.
See the linked FAQ entry to see if adding the Kubernetes Client BOM solves your issue.
Thanks for the quick response @manusa . I think I am doing something wrong. I have tried the configuration below but it still gives same error. Am I using it wrong?
`
dependencyManagement {
imports {
dependencies {
dependency("io.fabric8:kubernetes-client-bom:6.12.1")
}
mavenBom("org.springframework.cloud:spring-cloud-dependencies:2023.0.1")
}
}
`
Thanks for the quick response @manusa . I think I am doing something wrong. I have tried the configuration below but it still gives same error. Am I using it wrong?
`
dependencyManagement {
imports { dependencies { dependency("io.fabric8:kubernetes-client-bom:6.12.1") } mavenBom("org.springframework.cloud:spring-cloud-dependencies:2023.0.1") }
}
`
Not sure how this is done on Gradle, but try:
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:2023.0.1")
mavenBom("io.fabric8:kubernetes-client-bom:6.12.1")
}
}
Describe the bug
I am using kubernetes client version 6.12.1 and also for dependencyManagement my gradle file uses mavenBom spring-cloud-depencencies. But when I run my app I am getting this error Getting java.lang.ClassNotFoundException: io.fabric8.kubernetes.client.dsl.V1FlowControlAPIGroupDSL.
If I remove dependencyManagement part from my gradle error does not happen but I need it. Also I have checked other versions of the kubernetes client and I seen that 6.9.2 works.
Fabric8 Kubernetes Client version
6.12.1
Steps to reproduce
You can use this repo for reproducing the bug https://github.com/KaanSimsek/kubernetes-client-bug
Expected behavior
Being able to use mavenBom as dependency management.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3@latest
Environment
macOS
Fabric8 Kubernetes Client Logs
Additional context
No response