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

Kubernetes plugin Windows agent support

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am running a Kubernetes cluster with a Windows node to run my tests on. I have installed the Kubernetes plugin in Jenkins, and when a pod is created in the Windows node it creates the jnlp-slave container in it as well, but the image is Linux based. This fails the pod creation, I looked everywhere for a way to omit the jnlp-slave container or at the very least change it to one that works on Windows from the 'Configure System' section. 

      On that same note is there an official jnlp-slave image for Windows, or is the Linux on the only available? If not this can be added as a choice for the user if they are using windows pods.

      Thanks

        Attachments

          Issue Links

            Activity

            moraesmedacuity Otavio Moraes created issue -
            Hide
            csanchez Carlos Sanchez added a comment -

            There is no support for windows yet

            Show
            csanchez Carlos Sanchez added a comment - There is no support for windows yet
            csanchez Carlos Sanchez made changes -
            Field Original Value New Value
            Summary JNLP-Slave container failing to start on Windows Node Kubernetes plugin Windows agent support
            Hide
            snapstromegon Raphael Höser added a comment -

            If you create a container with the name "jnlp" you prevent the default jnlp image from starting - so you can create your own jnlp windows image which takes it place. 

            Show
            snapstromegon Raphael Höser added a comment - If you create a container with the name "jnlp" you prevent the default jnlp image from starting - so you can create your own jnlp windows image which takes it place. 
            Hide
            olblak Olivier Vernin added a comment -

            Raphael Höser I guess doing that means that your linux node will not use the correct docker image anyore

            Show
            olblak Olivier Vernin added a comment - Raphael Höser I guess doing that means that your linux node will not use the correct docker image anyore
            Hide
            snapstromegon Raphael Höser added a comment -

            Olivier Vernin Since you need to create two pods to build on windows and linux you can use two different containers as jnlp containers.

            You create two podTemplates with each a container named jnlp. In the containerTemplate you set the image to thw jnlp image for your platform (on linux you can also not create a jnlp container to use the default, but be aware of inheritance).

            That way you can have a linux and a windows jnlp node in your cluster.

             

            If I didn't understand you correctly and you meant something else with "your linux node will not use the correct docker image anymore" please clarify.

            Show
            snapstromegon Raphael Höser added a comment - Olivier Vernin Since you need to create two pods to build on windows and linux you can use two different containers as jnlp containers. You create two podTemplates with each a container named jnlp. In the containerTemplate you set the image to thw jnlp image for your platform (on linux you can also not create a jnlp container to use the default, but be aware of inheritance). That way you can have a linux and a windows jnlp node in your cluster.   If I didn't understand you correctly and you meant something else with "your linux node will not use the correct docker image anymore" please clarify.
            Hide
            olblak Olivier Vernin added a comment -

            No indeed you are totally right, two different pods can have different container with the same name and in this case jnlp

            Show
            olblak Olivier Vernin added a comment - No indeed you are totally right, two different pods can have different container with the same name and in this case jnlp
            jglick Jesse Glick made changes -
            Labels jnlp-slave kubernetes kubernetes-plugin windows jnlp-slave windows
            jglick Jesse Glick made changes -
            Issue Type Improvement [ 4 ] New Feature [ 2 ]
            jglick Jesse Glick made changes -
            Assignee Carlos Sanchez [ csanchez ]
            Hide
            snapstromegon Raphael Höser added a comment -

            In my opinion this would be solved, if jenkins would provide a jnlp image based on the openjdk:8-windowsservercore image. This would make the jnlp image windows friendly.

            By the way: If your windows node allows running windows and linux containers side by side I think no changes are necessary.

            Show
            snapstromegon Raphael Höser added a comment - In my opinion this would be solved, if jenkins would provide a jnlp image based on the openjdk:8-windowsservercore image. This would make the jnlp image windows friendly. By the way: If your windows node allows running windows and linux containers side by side I think no changes are necessary.
            Hide
            mluyo3414 Miguel Suarez added a comment - - edited

            did anybody solve this? I was able to provision the pod with a Windows jnlp agent and the logs show connected but it gets stuck not executing the step for the Windows container 

            Show
            mluyo3414 Miguel Suarez added a comment - - edited did anybody solve this? I was able to provision the pod with a Windows jnlp agent and the logs show connected but it gets stuck not executing the step for the Windows container 
            vlatombe Vincent Latombe made changes -
            Link This issue depends on JENKINS-53500 [ JENKINS-53500 ]
            Hide
            slide_o_mix Alex Earl added a comment -

            Raphael Höser I am in the process of supporting an openjdk:8-windowsservercore image, you can see the test image at jenkins4eval/jnlp-agent:latest-windows on DockerHub.

            Show
            slide_o_mix Alex Earl added a comment - Raphael Höser I am in the process of supporting an openjdk:8-windowsservercore image, you can see the test image at jenkins4eval/jnlp-agent:latest-windows on DockerHub.
            Hide
            olblak Olivier Vernin added a comment - - edited

            Miguel Suarez, with the help of Alex Earl, I was able to run a job inside windows container, right now the 'container step' doesn't seem be working, so everything need to be running inside the 'jnlp' container. I have a working example here

            Show
            olblak Olivier Vernin added a comment - - edited Miguel Suarez , with the help of Alex Earl , I was able to run a job inside windows container, right now the 'container step' doesn't seem be working, so everything need to be running inside the 'jnlp' container. I have a working example  here
            Hide
            jglick Jesse Glick added a comment -

            the 'container step' doesn't seem be working

            Known limitation: JENKINS-53500

            Show
            jglick Jesse Glick added a comment - the 'container step' doesn't seem be working Known limitation: JENKINS-53500
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
            jglick Jesse Glick made changes -
            Released As https://github.com/jenkinsci/kubernetes-plugin/releases/tag/kubernetes-1.21.0
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              moraesmedacuity Otavio Moraes
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: