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

          [JENKINS-57256] Kubernetes plugin Windows agent support

          There is no support for windows yet

          Carlos Sanchez added a comment - There is no support for windows yet

          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. 

          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. 

          snapstromegon I guess doing that means that your linux node will not use the correct docker image anyore

          Olivier Vernin added a comment - snapstromegon I guess doing that means that your linux node will not use the correct docker image anyore

          olblak 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.

          Raphael Höser added a comment - olblak 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.

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

          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

          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.

          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.

          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 

          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 

          Alex Earl added a comment -

          snapstromegon 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.

          Alex Earl added a comment - snapstromegon 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.

          Olivier Vernin added a comment - - edited

          mluyo3414, with the help of slide_o_mix, 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

          Olivier Vernin added a comment - - edited mluyo3414 , with the help of slide_o_mix , 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

          Jesse Glick added a comment -

          the 'container step' doesn't seem be working

          Known limitation: JENKINS-53500

          Jesse Glick added a comment - the 'container step' doesn't seem be working Known limitation: JENKINS-53500

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

              Created:
              Updated:
              Resolved: