How to: Is it possible to run docker inside a pod?
Yes. The two tricks are:

Your pod must run in privileged mode. kubelet must run with `--allow-privileged=true`(this is the default) and the pod must run with `securityContext.privileged: true`. This will allow your pod to mount the host docker socket directly.  

You must mount the host docker socket by specifying `volumes.hostPath.path: /var/run/docker.sock` in your pod spec. 

Here is a simple alpine docker deployment which can run docker commands:
```
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: docker
  name: docker
spec:
  template:
    metadata:
      labels:
        app: docker
    spec:
      containers:
      - command: ["/bin/sleep","365d"]
        image: hubt/alpine-docker
        imagePullPolicy: Always
        name: docker
        securityContext:
          privileged: true
        terminationMessagePath: /dev/termination-log
        volumeMounts:
        - mountPath: /var/run/docker.sock
          name: docker-socket
      imagePullSecrets:
      - name: registrypullsecret
      volumes:
      - hostPath:
          path: /var/run/docker.sock
        name: docker-socket
```