title: kubectl exec failed with "container <command> is not valid for pod <pod_name>"
body: <p>I am working with Minikube and I have alpine pod with one container.<br>
  When I run:<br>
  <code>kubectl exec -it -v=6 alpinec1-7c65db48b4-v2gpc /bin/sh</code>  </p>
  
  <p>I receive a shell and I can run any command (<code>ifconfig</code>, etc.) inside it.  </p>
  
  <p>But when I tried to run <code>sh</code> with <code>-c</code> it failed:</p>
  
  <pre><code>root:~# kubectl exec -it -v=6 alpinec1-7c65db48b4-v2gpc /bin/sh -c 'ifconfig'
  I0722 05:45:25.091111   80392 loader.go:357] Config loaded from file /home/root/.kube/config
  I0722 05:45:25.111876   80392 round_trippers.go:405] GET https://192.168.190.143:8443/api/v1/namespaces/default/pods/alpinec1-7c65db48b4-v2gpc 200 OK in 16 milliseconds
  I0722 05:45:25.232564   80392 round_trippers.go:405] POST https://192.168.190.143:8443/api/v1/namespaces/default/pods/alpinec1-7c65db48b4-v2gpc/exec?command=%2Fbin%2Fsh&amp;container=ifconfig&amp;container=ifconfig&amp;stdin=true&amp;stdout=true&amp;tty=true 400 Bad Request in 13 milliseconds
                                                                       I0722 05:45:25.232921   80392 helpers.go:201] server response object: [{
    "kind": "Status",
    "apiVersion": "v1",
    "metadata": {},
    "status": "Failure",
    "message": "container ifconfig is not valid for pod alpinec1-7c65db48b4-v2gpc",
    "reason": "BadRequest",
    "code": 400
  }]
  F0722 05:45:25.233095   80392 helpers.go:119] Error from server (BadRequest): container ifconfig is not valid for pod alpinec1-7c65db48b4-v2gpc
  </code></pre>