Skip to content

kubectl cp fails on large files  #60140

@tnine

Description

@tnine

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:
Copying either a large file, or a large directory from a container via kubectl cp results in the error of error: unexpected EOF and a failure to transfer. In my case, the file is 1.7G.

I executed the following command

kubectl cp infra-cassandra-global-0:cassandra.tar.gz infra-cassandra-global-0-cassandra.tar.gz

The command executes, however the terminal will print the error below after 10-14 seconds of execution, and no file is copied.

error: unexpected EOF

What you expected to happen:

The large file to be downloaded from the container.

How to reproduce it (as minimally and precisely as possible):

Add a large file >= 1.7G to any location in the pod. I was able to re-create this will the file on a PV, or locally on the image file system.

Execute kubectl cp to download the large file. It will fail.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.8.6, client v1.8.5
  • Cloud provider or hardware configuration: AWS
  • OS (e.g. from /etc/os-release): k8s-1.8-debian-jessie-amd64-hvm-ebs-2017-12-02 (ami-06a57e7e)
  • Kernel (e.g. uname -a):
  • Install tools: Kops
  • Others:

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.sig/cliCategorizes an issue or PR as relevant to SIG CLI.sig/nodeCategorizes an issue or PR as relevant to SIG Node.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type
No fields configured for issues without a type.

Projects

Status
Closed
Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions