I'm trying to figure out the simplest way to transfer gigabytes of log files from my Kubernetes pods to my local Mac. Right now, I SSH into my pods via a bastion host, but the connection frequently drops because of the large file sizes. I need a more efficient way to share these log dumps with my customers for investigation into any errors that might have occurred.
5 Answers
Consider using a logging service like Graylog. Sending logs to a service like this allows you to search and index logs without directly accessing the pods.
A good approach is to upload the logs from your pod to a fast storage solution and then download them from there. Using a service like Loki for managing logs can also streamline this process.
Instead of accessing the pods directly for logs, you might want to set up a centralized logging system, like Loki. This way, you can gather logs without jumping into the pods, which is a more efficient Kubernetes setup.
Just curious, when you're accessing your pods through a bastion host, how are you trying to copy the logs? Are you using an SSH tunnel and running `kubectl cp` over it?
You could try compressing your logs first; that can reduce their size by around 70%. Then use a tool to split the files into smaller chunks and transfer those pieces over.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures