title: how to run kubelet as docker container
body: <p>Can I run kubelet as a docker container based on kubernetes v1.6.6? if can do, how to create the image or where to get a image, and also how to run this image?</p>
  
  <p>the following is my ops, but has some problems.</p>
  
  <p>Dockerfile
  <code>
  FROM i71:5000/ubuntu:14.04
  ADD iptables /usr/local/bin/iptables
  ADD bin/kubelet /usr/local/bin/kubelet
  </code></p>
  
  <p>docker runing sh
  <code>
   #!/bin/bash
      docker rm -f $(docker ps -aq --filter "name=kubelet")
      docker run \
        -d \
        --restart="always" \
        --net="host" \
        -v /data/kubernetes-cluster/ssl:/data/kubernetes-cluster/ssl \
        -v /data/kubernetes-cluster/kube-conf:/data/kubernetes-cluster/kube-conf \
        -v /data/kubernetes-cluster/log:/data/kubernetes-cluster/log \
        -v /data/kubelet:/var/lib/kubelet \
        -v /etc/localtime:/etc/localtime \
        -v /var/run/:/var/run/ \
        -v /var/log/:/var/log/ \
        --privileged=true \
        --name kubelet \
        i71:5000/kubelet:v1.6.6 \
        /usr/local/bin/kubelet \
        --logtostderr=true \
        --v=0 \
        --cgroup-driver=cgroupfs \
        --api-servers=http://192.168.0.97:8080 \
        --docker-endpoint=http://127.0.0.1:4243 \
        --address=192.168.0.97 \
        --hostname-override=192.168.0.97 \
        --allow-privileged=true \
        --pod-infra-container-image=i71:5000/pod-infrastructure:rhel7 \
        --cluster-dns=10.3.0.2 \
        --experimental-bootstrap-kubeconfig=/data/kubernetes-cluster/kube-conf/bootstrap.kubeconfig \
        --kubeconfig=/data/kubernetes-cluster/kube-conf/kubelet.kubeconfig \
        --require-kubeconfig \
        --cert-dir=/data/kubernetes-cluster/ssl \
        --cluster-domain=cluster.local. \
        --hairpin-mode=promiscuous-bridge \
        --serialize-image-pulls=false
  </code></p>
  
  <p>kubelet prints these errors(my docker damon pid is 5140):
  <code>
      E0706 12:11:46.061949       1 container_manager_linux.go:394] open /proc/5140/cgroup: no such file or directory
      E0706 12:11:46.137217       1 container_manager_linux.go:97] Unable to ensure the docker processes run in the desired containers
      E0706 12:16:46.062290       1 container_manager_linux.go:394] open /proc/5140/cgroup: no such file or directory
      E0706 12:16:46.138189       1 container_manager_linux.go:97] Unable to ensure the docker processes run in the desired containers
  </code></p>
  
  <p>if i do volume host dir '/proc', an error occurred by docker damon.
  <code>
      docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting\\\"/proc\\\" to rootfs \\\"/data/docker/local-storage/docker/aufs/mnt/6ad53fff3b30e8d709b1be326f5de1314371e174e34806d4d6c6436275b6fbd3\\\" at \\\"/proc\\\" caused \\\"\\\\\\\"/data/docker/local-storage/docker/aufs/mnt/6ad53fff3b30e8d709b1be326f5de1314371e174e34806d4d6c6436275b6fbd3/proc\\\\\\\" cannot be mounted because it is located inside \\\\\\\"/proc\\\\\\\"\\\"\"".
  </code></p>
  
  <p>what should i do, can anyone show me a light?</p>