title: kubernetes copy command does not respond
body: <p>I want to copy one folder to pod, I am using below command <br/><br/>
  <code>kubectl cp keys $POD:/home/oracle/</code>
  <br/><br/>
  Issue is when I hit enter, I do not see any response(it does not exit after copying folder), as if the command is taking long time, although when I check POD I can see folder is copied. </p>
  
  <p>I need to close it with <kbd>ctrl</kbd>+<kbd>c</kbd> to execute next command.</p>
  
  <p>below is debug log</p>
  
  <p>```</p>
  
  <pre><code>kubectl cp test $POD:/home/oracle/ -v=8
   loader.go:357] Config loaded from file /root/.kube/config
   round_trippers.go:414] GET https://192.168.3.236:6443/api/v1/namespaces/default/pods/xnode-2-56cb894476-w9thk
   round_trippers.go:421] Request Headers:
   round_trippers.go:424]     Accept: application/json, */*
   round_trippers.go:424]     User-Agent: kubectl/v1.9.5 (linux/amd64) kubernetes/f01a2bf
   round_trippers.go:439] Response Status: 200 OK in 25 milliseconds
   round_trippers.go:442] Response Headers:
   round_trippers.go:445]     Content-Type: application/json
   round_trippers.go:445]     Content-Length: 2594
   round_trippers.go:445]     Date: Fri, 23 Mar 2018 03:34:50 GMT
   request.go:873] Response Body: {"kind":"Pod","apiVersion":"v1","metadata":{"name":"xnode-2-56cb894476-w9thk","generateName":"xnode-2-56cb894476-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/xnode-2-56cb894476-w9thk","uid":"bd88c607-2db6-11e8-aa6f-525400ddd5c6","resourceVersion":"1213768","creationTimestamp":"2018-03-22T09:52:32Z","labels":{"pod-template-hash":"1276450032","run":"xnode-2"},"ownerReferences":[{"apiVersion":"extensions/v1beta1","kind":"ReplicaSet","name":"xnode-2-56cb894476","uid":"bd78a06e-2db6-11e8-aa6f-525400ddd5c6","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"default-token-mf6z4","secret":{"secretName":"default-token-mf6z4","defaultMode":420}}],"containers":[{"name":"xnode-2","image":"engg-nexus.com:8511/ms-linux","args":["/bin/bash"],"env":[{"name":"JAVA_HOME","value":"/usr/orps/java/jdk1.8.0_144"},{"name":"DISPLAY","value":":1"}],"resources":{},"volumeMounts":[{"name":"default-token-mf6z4","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/s [truncated 1570 chars]
   round_trippers.go:414] POST https://192.168.3.236:6443/api/v1/namespaces/default/pods/xnode-2-56cb894476-w9thk/exec?command=test&amp;command=-d&amp;command=%2Fhome%2Foracle%2F%2Fconfig&amp;container=xnode-2&amp;container=xnode-2&amp;stderr=true&amp;stdout=true
   round_trippers.go:421] Request Headers:
   round_trippers.go:424]     X-Stream-Protocol-Version: v4.channel.k8s.io
   round_trippers.go:424]     X-Stream-Protocol-Version: v3.channel.k8s.io
   round_trippers.go:424]     X-Stream-Protocol-Version: v2.channel.k8s.io
   round_trippers.go:424]     X-Stream-Protocol-Version: channel.k8s.io
   round_trippers.go:424]     User-Agent: kubectl/v1.9.5 (linux/amd64) kubernetes/f01a2bf
   round_trippers.go:439] Response Status: 101 Switching Protocols in 75 milliseconds
   round_trippers.go:442] Response Headers:
   round_trippers.go:445]     Connection: Upgrade
   round_trippers.go:445]     Upgrade: SPDY/3.1
   round_trippers.go:445]     X-Stream-Protocol-Version: v4.channel.k8s.io
   round_trippers.go:445]     Date: Fri, 23 Mar 2018 03:34:50 GMT
   round_trippers.go:414] GET https://192.168.3.236:6443/api/v1/namespaces/default/pods/xnode-2-56cb894476-w9thk
   round_trippers.go:421] Request Headers:
   round_trippers.go:424]     Accept: application/json, */*
   round_trippers.go:424]     User-Agent: kubectl/v1.9.5 (linux/amd64) kubernetes/f01a2bf
   round_trippers.go:439] Response Status: 200 OK in 4 milliseconds
   round_trippers.go:442] Response Headers:
   round_trippers.go:445]     Content-Length: 2594
   round_trippers.go:445]     Date: Fri, 23 Mar 2018 03:34:50 GMT
   round_trippers.go:445]     Content-Type: application/json
   request.go:873] Response Body: {"kind":"Pod","apiVersion":"v1","metadata":{"name":"xnode-2-56cb894476-w9thk","generateName":"xnode-2-56cb894476-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/xnode-2-56cb894476-w9thk","uid":"bd88c607-2db6-11e8-aa6f-525400ddd5c6","resourceVersion":"1213768","creationTimestamp":"2018-03-22T09:52:32Z","labels":{"pod-template-hash":"1276450032","run":"xnode-2"},"ownerReferences":[{"apiVersion":"extensions/v1beta1","kind":"ReplicaSet","name":"xnode-2-56cb894476","uid":"bd78a06e-2db6-11e8-aa6f-525400ddd5c6","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"default-token-mf6z4","secret":{"secretName":"default-token-mf6z4","defaultMode":420}}],"containers":[{"name":"xnode-2","image":"engg-nexus.com:8511/ms-linux","args":["/bin/bash"],"env":[{"name":"JAVA_HOME","value":"/usr/orps/java/jdk1.8.0_144"},{"name":"DISPLAY","value":":1"}],"resources":{},"volumeMounts":[{"name":"default-token-mf6z4","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/s [truncated 1570 chars]
   round_trippers.go:414] POST https://192.168.3.236:6443/api/v1/namespaces/default/pods/xnode-2-56cb894476-w9thk/exec?command=tar&amp;command=xf&amp;command=-&amp;command=-C&amp;command=%2Fhome%2Foracle%2F%2Fconfig&amp;container=xnode-2&amp;container=xnode-2&amp;stderr=true&amp;stdin=true&amp;stdout=true
   round_trippers.go:421] Request Headers:
   round_trippers.go:424]     X-Stream-Protocol-Version: v4.channel.k8s.io
   round_trippers.go:424]     X-Stream-Protocol-Version: v3.channel.k8s.io
   round_trippers.go:424]     X-Stream-Protocol-Version: v2.channel.k8s.io
   round_trippers.go:424]     X-Stream-Protocol-Version: channel.k8s.io
   round_trippers.go:424]     User-Agent: kubectl/v1.9.5 (linux/amd64) kubernetes/f01a2bf
   round_trippers.go:439] Response Status: 101 Switching Protocols in 69 milliseconds
   round_trippers.go:442] Response Headers:
   round_trippers.go:445]     Connection: Upgrade
   round_trippers.go:445]     Upgrade: SPDY/3.1
   round_trippers.go:445]     X-Stream-Protocol-Version: v4.channel.k8s.io
   round_trippers.go:445]     Date: Fri, 23 Mar 2018 03:34:50 GMT
  </code></pre>
  
  <p>```</p>