<p>I have a jenkins instance created using <code>docker run -d -v /Users/dlovison/Documents/DockerVolumes/jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts</code> deployed only on my local environment</p>

<p>I would like to connect in my remote openshift instance (openshift.com)</p>

<p>I followed the tutorial <a href="http://v1.uncontained.io/playbooks/continuous_delivery/external-jenkins-integration.html" rel="nofollow noreferrer">http://v1.uncontained.io/playbooks/continuous_delivery/external-jenkins-integration.html</a> and all steps are working except when my local jenkins try to connect via jnlp</p>

<p>The errors are:</p>

<pre><code>Waiting for Pod to be scheduled (65/100): jenkins-slave-j8gmr-28v7x
Container is waiting jenkins-slave-j8gmr-28v7x [jnlp]: ContainerStateWaiting(message=Error response from daemon: create 110861e4dd42a6343dbd584f09a7967e714feb0155cf070aff167495c01ada39: error while creating volume path '/var/lib/docker/volumes/110861e4dd42a6343dbd584f09a7967e714feb0155cf070aff167495c01ada39/_data': mkdir /var/lib/docker/volumes/110861e4dd42a6343dbd584f09a7967e714feb0155cf070aff167495c01ada39: permission denied, reason=CreateContainerError, additionalProperties={})
Waiting for Pod to be scheduled (66/100): jenkins-slave-j8gmr-28v7x
Container is waiting jenkins-slave-j8gmr-28v7x [jnlp]: ContainerStateWaiting(message=Error response from daemon: create 110861e4dd42a6343dbd584f09a7967e714feb0155cf070aff167495c01ada39: error while creating volume path '/var/lib/docker/volumes/110861e4dd42a6343dbd584f09a7967e714feb0155cf070aff167495c01ada39/_data': mkdir /var/lib/docker/volumes/110861e4dd42a6343dbd584f09a7967e714feb0155cf070aff167495c01ada39: permission denied, reason=CreateContainerError, additionalProperties={})
</code></pre>

<p>My service account contains the role: 'admin' and 'edit'</p>

<p>Here is my pipeline</p>

<pre><code>apiVersion: v1
kind: BuildConfig
metadata:
  name: sample-pipeline-v4
  labels:
    name: sample-pipeline-v4
spec:
  strategy:
    type: JenkinsPipeline
    jenkinsPipelineStrategy:
      env:
      - name: "FOO"
        value: "BAR"
      jenkinsfile: |-

        def label = "diego-pod-${UUID.randomUUID().toString()}"

        podTemplate(label: label, containers: [
          containerTemplate(name: 'maven', image: 'registry.access.redhat.com/openshift3/jenkins-slave-maven-rhel7', ttyEnabled: true, command: 'cat')
          ]) {

          node(label) {
            stage('Build a Maven project') {
              git 'https://github.com/jenkinsci/kubernetes-plugin.git'
              container('maven') {
                  sh 'mvn -B clean package'
              }
            }
          }
        }
</code></pre>

<p>I have the plugin <a href="https://github.com/openshift/jenkins-sync-plugin/" rel="nofollow noreferrer">https://github.com/openshift/jenkins-sync-plugin/</a> that do all the hard work</p>

<p>Basically, it cannot create a volume on your Kubernetes/Openshift cluster. It's unclear from the question where your Openshift cluster is running, so creating a volume will depend on your cloud/StorageClass. Can you Try these commands?</p>

<pre><code>oc get pvc
oc get pv
</code></pre>

<p>With the output</p>

<pre><code>oc describe pvc &lt;name-from-previous-step&gt;
oc describe pv &lt;name-from-previous-step&gt;
</code></pre>
