Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67483

Plugin incompatible with dependency kubernetes-client-api

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • Kubernetes: 1.22.4 (Docker Desktop: 4.3.2 - WSL2)
      Jenkins: 2.319.1 (Deployed in Kubernetes using open-source helm chart)
      Kubernetes-Plugin: 1.31.1
      Behind corporate proxy
    • kubernetes 1.31.2

      Latest version of kubernetes-client-api: 5.11.1-179.v12037658df90 dependency breaks Kubernetes plugin.

      When running Jenkinsfile pipeline and using container('name') syntax, fails to exec into separate container. Errors with:

      Timed out waiting for websocket connection. You should increase the value of system property org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator.websocketConnectionTimeout currently set at 30 seconds

      Jenkins server logs say something different (actual error):

      java.lang.NoSuchMethodError: 'okhttp3.OkHttpClient io.fabric8.kubernetes.client.HttpClientAware.getHttpClient()'

      Using yamlFile and Multibranch pipeline.

          [JENKINS-67483] Plugin incompatible with dependency kubernetes-client-api

          I faced exactly the same issue. I have similar env, difference is k8 version (mine is 1.21), jenkins also deployed with helm.

          Workarround is to downgrade to plugin to previous version (kubernetes-client-api:5.10.1-171.vaa0774fb8c20) explicitly, and also other plugins that have dependency on this one. In my case they were kubernetes (downgraded to 1.30.1), kubernetes-credentials (downgraded to 0.8.0) and kubernetes-credentials-provider (downgraded to 0.18-1). 

           

          Branko Jovanović added a comment - I faced exactly the same issue. I have similar env, difference is k8 version (mine is 1.21), jenkins also deployed with helm. Workarround is to downgrade to plugin to previous version (kubernetes-client-api:5.10.1-171.vaa0774fb8c20) explicitly, and also other plugins that have dependency on this one. In my case they were kubernetes (downgraded to 1.30.1), kubernetes-credentials (downgraded to 0.8.0) and kubernetes-credentials-provider (downgraded to 0.18-1).   

          I have exactly the same issue. Running in a similar environment, though my Jenkins is deployed to Kubernetes by hand.

          Unfortunately, I haven't been able to just downgrade the plugins so far - Jenkins fails to start with a CasC error on cloud configuration. I've yet to figure out how to fix that without loosing my entire cloud setup.

          Lars Skjærlund added a comment - I have exactly the same issue. Running in a similar environment, though my Jenkins is deployed to Kubernetes by hand. Unfortunately, I haven't been able to just downgrade the plugins so far - Jenkins fails to start with a CasC error on cloud configuration. I've yet to figure out how to fix that without loosing my entire cloud setup.

          Found the time to do the downgrade properly - and I can confirm that downgrading the plugin to kubernetes-client-api:5.10.1-171.vaa0774fb8c20 works for me as well.

          Lars Skjærlund added a comment - Found the time to do the downgrade properly - and I can confirm that downgrading the plugin to kubernetes-client-api:5.10.1-171.vaa0774fb8c20 works for me as well.

          Barney added a comment -

          Jenkins plugin 'Kubernetes Client API' 5.11.1-179.v12037658df90 (released on Dec 29 2021) contains fabric8 kubernetes client 5.11.1, which has breaking API changes, see https://github.com/fabric8io/kubernetes-client/releases/tag/v5.11.0

          Jenkins plugin 'Kubernetes' 1.31.1 was released on Dec 15 2021, so it cannot possibly be adapted to the breaking api changes.

          Looking at recent commits (e.g. here https://github.com/jenkinsci/kubernetes-plugin/commit/6e06139b41537f71cc1a0625c31e62cd48c45a5e ) the adaptations to the api changes seem to have been done, but not yet released.

          Was 'Kubernetes Client API' 5.11.1-179.v12037658df90 released in error? vlatombe, can you maybe comment?

          Barney added a comment - Jenkins plugin 'Kubernetes Client API' 5.11.1-179.v12037658df90 (released on Dec 29 2021) contains fabric8 kubernetes client 5.11.1, which has breaking API changes, see https://github.com/fabric8io/kubernetes-client/releases/tag/v5.11.0 Jenkins plugin 'Kubernetes' 1.31.1 was released on Dec 15 2021, so it cannot possibly be adapted to the breaking api changes. Looking at recent commits (e.g. here https://github.com/jenkinsci/kubernetes-plugin/commit/6e06139b41537f71cc1a0625c31e62cd48c45a5e  ) the adaptations to the api changes seem to have been done, but not yet released. Was 'Kubernetes Client API' 5.11.1-179.v12037658df90 released in error? vlatombe , can you maybe comment?

          Sorry for the mess, Kubernetes plugin 1.31.2 has been released and updated to work with the Kubernetes Client API. From the error mentioned in the description, this should fix the issue.

          Vincent Latombe added a comment - Sorry for the mess, Kubernetes plugin 1.31.2 has been released and updated to work with the Kubernetes Client API. From the error mentioned in the description, this should fix the issue.

          Barney added a comment -

          Was anybody able to confirm the 'Kubernetes' jenkins plugin 1.31.2 now properly works with 'Kubernetes Client API' 5.11.1-179.v12037658df90 ?

          If so, wouldn't it make sense to resolve this ticket here (as well as the linked ones)?

          Shouldn't this issue be mentioned in the release notes?

          Barney added a comment - Was anybody able to confirm the 'Kubernetes' jenkins plugin 1.31.2 now properly works with 'Kubernetes Client API' 5.11.1-179.v12037658df90 ? If so, wouldn't it make sense to resolve this ticket here (as well as the linked ones)? Shouldn't this issue be mentioned in the release notes?

          Oliver Grad added a comment -

          Hi,

          we've run into the same issue since we've installed Kubernetes-Plugin: 1.31.1 yesterday morning.

          Some minutes ago we upgraded to Kubernetes-Plugin: 1.31.2 and the problem is solved for us.

          Oliver Grad added a comment - Hi, we've run into the same issue since we've installed Kubernetes-Plugin: 1.31.1 yesterday morning. Some minutes ago we upgraded to Kubernetes-Plugin: 1.31.2 and the problem is solved for us.

          It is working for me!

          Ryan Bambrough added a comment - It is working for me!

          Yep, works for me as well.

          Thank you!

          Lars Skjærlund added a comment - Yep, works for me as well. Thank you!

            vlatombe Vincent Latombe
            rbambrough Ryan Bambrough
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: