title: How to handle "docker-in-docker" problem when using Jenkins inside K8S
body: <p>New to Kubernetes, a little complex question needs help.</p>
  
  <h2>Background</h2>
  
  <ol>
  <li>Using Jenkins in GKE (Google Kubernetes Engine)</li>
  <li>Want to use <code>jenkins-docker</code> plugin to provide the specific test environment for each type of tests</li>
  <li>Don't want to mixin <code>docker</code> binary in the Jenkins image (because it is large)</li>
  <li>Don't want <code>docker-in-docker</code>
  
  <ol>
  <li>More specifically, I don't want the Jenkins Pod be a new Docker Server</li>
  </ol></li>
  </ol>
  
  <h2>What I want</h2>
  
  <ol>
  <li>Each test environment can create a new pod in GKE Cluster, rather than creating containers inside the Jenkins Pod</li>
  </ol>
  
  <h2>P.S.</h2>
  
  <p>I have just read some articles, but half of them are telling about "how to use K8S to scale up the Jenkins (using jenkins-slave + jenkins-kubernates plugin)", another half are telling about how to "use docker plugin in a dockerized jenkins container on a bare metal machine (you can use <code>/var/run/docker.sock</code> to communicate between the host and the docker container)<strong>", but I cannot find **how to use docker plugin (to provide a specific environment) in a dockerized jenkins container inside K8S</strong></p>