<p>I understand that you can create a pod with Deployment/Job using kubectl run.  But is it possible to create one with a volume attached to it?  I tried running this command:</p>

<pre><code>kubectl run -i --rm --tty ubuntu --overrides='{ "apiVersion":"batch/v1", "spec": {"containers": {"image": "ubuntu:14.04", "volumeMounts": {"mountPath": "/home/store", "name":"store"}}, "volumes":{"name":"store", "emptyDir":{}}}}' --image=ubuntu:14.04 --restart=Never -- bash
</code></pre>

<p>But the volume does not appear in the interactive bash.</p>

<p>Is there a better way to create a pod with volume that you can attach to?</p>

<p>Your JSON override is specified incorrectly. Unfortunately kubectl run just ignores fields it doesn't understand.</p>

<pre><code>kubectl run -i --rm --tty ubuntu --overrides='
{
  "apiVersion": "batch/v1",
  "spec": {
    "template": {
      "spec": {
        "containers": [
          {
            "name": "ubuntu",
            "image": "ubuntu:14.04",
            "args": [
              "bash"
            ],
            "stdin": true,
            "stdinOnce": true,
            "tty": true,
            "volumeMounts": [{
              "mountPath": "/home/store",
              "name": "store"
            }]
          }
        ],
        "volumes": [{
          "name":"store",
          "emptyDir":{}
        }]
      }
    }
  }
}
'  --image=ubuntu:14.04 --restart=Never -- bash
</code></pre>

<p>To debug this issue I ran the command you specified, and then in another terminal ran:</p>

<pre><code>kubectl get job ubuntu -o json
</code></pre>

<p>From there you can see that the actual job structure differs from your json override (you were missing the nested template/spec, and volumes, volumeMounts, and containers need to be arrays).</p>
