`kubectl cp` does not support resource/name format
What would you like to be added?
kubectl cp file.txt default/pod/mypod-0365fce5-b565b9fd9-zjw8h:/tmp/
should work, but it doesn't because of the pod/ resource type in the name.
Why is this needed?
Feature parity, principle of least surprise, consistency, flexibility, suitability for scripting with kubectl get pods -o name. Other subcommands do support this syntax.
@sanmai-NL: There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:
-
/sig <group-name> -
/wg <group-name> -
/committee <group-name>
Please see the group list for a listing of the SIGs, working groups, and committees available.
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.
@sanmai-NL: This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
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.
See also kubernetes/kubernetes#72104.
/sig cli /transfer kubectl
We don't plan on expanding kubectl cp functionality outside of pod resources. Is there a reason you'd need to use the pod/podname syntax?
We don't plan on expanding kubectl cp functionality outside of pod resources. Is there a reason you'd need to use the
pod/podnamesyntax?
Hi @eddiezane, Please see the Why this is needed section.
@eddiezane @sanmai-NL Is this still required..I may be interested to work on this.
@MayukhSobo we would accept a PR that adds this. It may require switching the cp command to use the builder that some of the other commands use. https://github.com/kubernetes/kubernetes/blob/4e785dc7e3ac1d01cedd23a0ed9c4a67dc9c214f/staging/src/k8s.io/kubectl/pkg/cmd/portforward/portforward.go#L304
/tirage accepted /priority backlog /assign @MayukhSobo
Hi @eddiezane,
I am interested in working on this, Is there any option to work on this issue?
Thanks
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted