Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Easy way to copy/download files from a pod/pv to your local PC #658

Closed
Erates opened this issue Apr 7, 2020 · 13 comments
Closed
Labels
enhancement New feature or request

Comments

@Erates
Copy link

Erates commented Apr 7, 2020

It would be nice if k9s adds the ability to copy/download a file/folder from a pod to your local PC.

Right now I enter the pod, search for the file, copy the file path, exit to my local PC and then do kubectl cp ...

It would be nice if there was an easy way, to say "copy this file to my local PC", either from the pods view or the persistent volume view.

@derailed derailed added the enhancement New feature or request label Apr 10, 2020
@leonidgorbachev
Copy link

I would be so nice feature - i was looking through k9s documentation trying to find the copy command\hotkey, but found this one enhancement suggestion

@dulom
Copy link

dulom commented May 22, 2021

Would really appreciate this feature ! Whats the chance of getting this ?

@lukeledet
Copy link

Would also love a way to upload a file to a pod, for example to run an sql file against a db only accessible from the cluster.

@petermeissner
Copy link

This is not an k9s solution but a workaround that might help in the meantime:

# Copy /tmp/foo from a remote pod to /tmp/bar locally
kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar

Source: https://stackoverflow.com/a/52408599/1144966

@derailed
Copy link
Owner

derailed commented Aug 6, 2021

@lukeledet @petermeissner @dulom [FYI] This feature is actually available in K9sAlpha...
Video

@f0def
Copy link

f0def commented Jun 7, 2023

Any updates on this feature?

@lplazas
Copy link

lplazas commented Jul 27, 2023

I'd be happy to contribute if any of the maintainers can confirm this isn't being worked on, @derailed @axinojolais @slimus

@axinojolais
Copy link

I'd be happy to contribute if any of the maintainers can confirm this isn't being worked on

Sorry @lplazas I'm not a maintainer, I merely updated an issue recently and that's it

@YarekTyshchenko
Copy link
Contributor

Can't this be done by the plugins system? https://k9scli.io/topics/plugins/

@Erates
Copy link
Author

Erates commented Aug 1, 2023

Can't this be done by the plugins system? https://k9scli.io/topics/plugins/

I don't think so, because you don't know the filename and path up front.

@abegosum
Copy link

I, too, would love this feature if possible.

@koeberlue
Copy link

I can confirm that downloading files from a pod works in v.0.28.2 when pressing t. I did not have time to test uploading, yet.

@derailed
Copy link
Owner

Fixed v0.28.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests