How to define pod with yaml in jenkinsci/kubernetes-plugin How to define pod with yaml in jenkinsci/kubernetes-plugin kubernetes kubernetes

How to define pod with yaml in jenkinsci/kubernetes-plugin


Based on a quick look at your pipeline DSL and YAML spec. The following snippet is what a direct translation of your DSL would look like (untested).

apiVersion: v1kind: Podmetadata:  labels:    label: label  spec:    containers:    - name: jnlp      image: artifactory.baorg.com:5001/sum/coreimage:1      tty: true    imagePullSecrets:    - name: ad-artifactory-cred

In your original configuration you specified that the default "jnlp" container not be used and instead use the container you specified. In your YAML version, you used the name "jenkins-slave" thereby indicating to the the plugin that you want the default jnlp container (jenkins/jnlp-slave:alpine) to be launched in the pod along with your "jenkins-slave" container.

As for why the pull fails, this is likely a network configuration issue (firewall or proxy) as indicated in the events. If you have access to the node, try doing a docker pull jenkins/jnlp-slave:aline manually to debug.