Kubectl: rsync behavior to copy files from pod to pod, perhaps for `kubectl cp`

Created on 30 Oct 2018  路  14Comments  路  Source: kubernetes/kubectl

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

/sig cli
/area kubectl
/kind feature

Right now looks like kubectl cp only allows copying local/remote and remote/local. This works for most cases by what if somebody wants to sync files from pod to pod

It would be nice to have something like this:

kubectl cp <namespace1>/<pod1>:/tmp/foo.txt <namespace2>/<pod1>:/tmp/foo.txt

This would probably also require a change in the kube-apiserver.

Kubernetes version (use kubectl version):

$ kubectl version Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:46:06Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:36:14Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: Any
  • OS (e.g. from /etc/os-release): Any
  • Kernel (e.g. uname -a): Any
  • Install tools: kubectl
  • Others: N/A

What happened:

kubectl cp supports local/remote or remote/local

What you expected to happen:

Support remote/remote

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

Run any kubectl cp command.

Anything else we need to know:

Some background info

arekubectl kinfeature sicli

All 14 comments

Note that there is a community product ksync, https://github.com/vapor-ware/ksync.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

The state and history of decision behind kubectl cp can be bound in https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/20190920-future-of-kubectl-cp.md. Also, other pointed at other solutions. With that I'm going to close this issue, since I don't think we'll be addressing it.
/close

@soltysh: Closing this issue.

In response to this:

The state and history of decision behind kubectl cp can be bound in https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/20190920-future-of-kubectl-cp.md. Also, other pointed at other solutions. With that I'm going to close this issue, since I don't think we'll be addressing it.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings