<p>I want to copy files from kubernetes pod into the local machine, but shows error like tihs:</p>
<pre><code>&gt; kubectl cp texhub-server-service-6f8d688c77-kvhgg:&quot;/app/core.21&quot; /Users/xiaoqiangjiang/core.21
tar: removing leading '/' from member names
Dropping out copy after 0 retries
error: unexpected EOF
</code></pre>
<p>why did this happen? what should I do to fixed this issue? I have already tried to add the retries parameter, still facing this issue:</p>
<pre><code>&gt; kubectl cp texhub-server-service-6f8d688c77-kvhgg:&quot;/app/core.21&quot; /Users/xiaoqiangjiang/core.21 --retries=3
tar: removing leading '/' from member names
Resuming copy at 888832 bytes, retry 0/3
tar: removing leading '/' from member names
Resuming copy at 1505280 bytes, retry 1/3
tar: removing leading '/' from member names
Resuming copy at 2125824 bytes, retry 2/3
tar: removing leading '/' from member names
Dropping out copy after 3 retries
error: unexpected EOF
</code></pre>
<p>this is the pods list:</p>
<pre><code>&gt; kubectl get pods
NAME                                     READY   STATUS    RESTARTS         AGE
admin-service-54f5d4b568-vbjg6           1/1     Running   345 (5m1s ago)   6d18h
ai-web-594648499d-hq8gx                  1/1     Running   0                58d
chat-server-service-686b4d59f7-x2tq2     2/2     Running   0                24d
cruise-web-74cc96797f-l7g55              1/1     Running   0                68d
cv-render-service-5489d5949c-f6stg       1/1     Running   1 (2d18h ago)    2d18h
cv-service-56cd946c4c-8p4t8              1/1     Running   0                29d
cv-web-647cbccd95-47w7d                  1/1     Running   0                29d
dolphin-music-service-597988cd59-bd92w   1/1     Running   2 (19d ago)      129d
dolphin-post-service-79df79d7f7-zww7x    1/1     Running   0                6d18h
official-website-776b6c6dfd-hfbcx        1/1     Running   0                407d
react-admin-new-6ff54c9889-9cwrf         1/1     Running   0                7d21h
rss-sync-service-77dd845898-wqhp2        1/1     Running   27 (31h ago)     8d
snap-web-66dbcc769f-sl6bs                1/1     Running   0                139d
texhub-server-service-6f8d688c77-kvhgg   1/1     Running   3 (20m ago)      30m
texhub-web-f9fd456f7-47ccc               1/1     Running   0                42h
tool-web-7f97bf5484-28j7r                1/1     Running   0                141d
y-websocket-service-768d56f54b-845kf     1/1     Running   12 (3d19h ago)   6d18h
</code></pre>
<p>the core.21 file size is 8Mb.</p>

Dolphin
<p>See if any of these two alternatives helps you</p>
<pre><code>kubectl cp texhub-server-service-6f8d688c77-kvhgg:&quot;/app/core.21&quot; /Users/xiaoqiangjiang/core.21 --retries=-1
</code></pre>
<p>retries=-1 (any negative value for infinite retrying)</p>
<p>Or</p>
<pre><code>kubectl exec texhub-server-service-6f8d688c77-kvhgg cat /app/core.21 &gt; /Users/xiaoqiangjiang/core.21
</code></pre>
