<p>I'm trying to copy files to/from a Windows container in a pod running on an ACS k8s cluster.</p>

<p>I'm using this kubectl command from my Windows 10 laptop:</p>

<pre><code>kubectl cp dev-acs-conn-testdn-1981314364-rjc0l:\app\nettrace.etl c:\
</code></pre>

<p>And I'm getting this error in response:</p>

<blockquote>
  <p>error: archive/tar: invalid tar header</p>
</blockquote>

<p>I've tried this from clusters running both v1.7.7 and v1.7.9 of k8s as well as Server 2016 ltsc and Server v1709. My kubectl.exe is v1.8.5. I have some valuable debugging files stranded on my container, any idea how I can get this to work?</p>

<p>So it turns out that the &quot;kubectl cp&quot; command requires that tar be in the container, not on the local system as I expected. And since Windows doesn't ship with tar.exe the problem lies there.</p>
<p>I deployed a new pod that included a Windows version of tar.exe and it's dependencies. This got me further in a Server 2016 ltsc container. I simply had to adjust my syntax slightly and the below worked:</p>
<pre><code>kubectl cp dev-acs-conn-testdn-1981314364-rjc0l:/app/nettrace.etl nettrace.etl
</code></pre>
<p>However, this same process does NOT work on a Server v1709 container. When I try exactly the same process I get this error:</p>
<blockquote>
<p>tar: Cannot open -: Permission denied</p>
<p>tar: Error is not recoverable: exiting now</p>
</blockquote>
<p>Clearly a permissions error, but I have no idea what permissions are the issue and how to change them. Any ideas?</p>
