kubernetes / kubernetes/kubectl

`kubectl cp` does not support resource/name format

Open
#1,325 25 comments 0 reactions 1 assignee View on GitHub

@MayukhSobo is already working on this.

Since Jan 4, 2023.

kind/feature lifecycle/rotten needs-triage priority/backlog sig/cli
Dominant language
Go
Stars
3.3k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### What would you like to be added?

```sh
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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.