-
Notifications
You must be signed in to change notification settings - Fork 43
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
Copy files from pod to local #193
Comments
This would be great. It looks like |
Now that import kr8s
# Copy file from my-pod:/etc/os-release to /tmp/os-release
with open("/tmp/os-release", "wb") as fh:
pod = kr8s.objects.Pod.get("my-pod")
pod.exec(["cat", "/etc/os-release"], stdout=fh) Copying in the other direction seems to be trickier due to #212. If we can find a workaround to this then we could implement a |
Thank you for your contribution |
I never found a solution to this problem, so I finally wrote an application to copy files without tar. |
@marcio-pessoa neat! Looking over the code it looks like it requires |
I'm sorry @jacobtomlinson . |
Sure, please don't take offence to my question. I was just curious about the use case for your project? |
No problem. I have some examples, but I can't use them all because of my contract. But Keycloak is a good example.
However, your project, the kr8s library is extremely elegant and is probably the best way to solve the problem currently. |
Ah that's interesting. Yeah it looks like any container built from I wonder if we could go in a totally different direction and use an EphemeralContainer instead. We would make the image configurable but default to something very small that does contain the dependencies necessary for copying files. That way we could even support |
Until the official Let's work together to make this dream come true. |
Which project are you requesting an enhancement for?
kr8s
What do you need?
Copy files from pod to local
The text was updated successfully, but these errors were encountered: