How can I copy files from a Kubernetes node to my local machine?

0
0
Asked By TechWhiz92 On

I'm trying to copy files or directories from a Kubernetes node to my local device. I've been using a tool that lets me access the node shell interactively, but now I want to extract some logs using a command like: `k node-shell mynode -- tar -czf- /var/log/... > o.tgz`. However, I'm running into an issue because `tar` won't write to a tty, giving me an error about missing the -f option. I tried a workaround using a shell command, but it seems to corrupt the binary data when I try to extract it. I also attempted using a different approach with `k debug`, but that ends up adding unwanted stderr into my tar file. Is there a direct method to get a binary stream from the node without using `ssh`?

0 Answers

There is no answer to this question yet. If you know the answer or can offer some help, please use the form below.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.