SSH Pod Log Downloader v1.0.2
SSH Pod Log Downloader v1.0.2
SSH Pod Log Downloader is a powerful command-line tool written in Go that simplifies the process of connecting to an SSH server, interacting with Kubernetes using kubectl, and downloading logs from a specified pod.
Installation and Usage
To start using SSH Pod Log Downloader, you have a few installation options:
Using go install
If you have Go installed on your system, you can use the following command to install SSH Pod Log Downloader:
go install github.com/ipsegs/sshpodlog@latestBinary Download
Alternatively, you can directly download the pre-built binary from the Releases section. Choose the appropriate binary for your operating system (Linux, macOS, or Windows) and architecture.
Manual Compilation
If you prefer, you can manually compile the tool using the provided scripts. Clone the repository and follow the instructions in the Installation section of the README.
Usage
Using SSH Pod Log Downloader is straightforward. Here are two common usage scenarios:
Using a Config File
You can load configuration settings from a config file using the -f or --from-file flag. This makes it easier to manage different environments and setups. For example:
sshpodlog -f config.yamlUsing Command-Line Arguments
You can also provide command-line arguments to specify the SSH server address, username, private key path, and other options directly. For example:
sshpodlog -s 192.168.1.100 -u myuser -k ~/.ssh/id_rsaReplace the arguments with the appropriate values for your SSH server configuration.
Notable Features
- Efficiently manage and retrieve logs from Kubernetes pods.
- Support for specifying SSH server address, port, username, cluster context, and private key.
- Option to load configuration from a config file for simplified environment management.
- Robustness in getting namespace.
Contributing
Contributions to SSH Pod Log Downloader are welcome! If you encounter any issues or have ideas for improvements, please open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License.
For more details and usage instructions, please refer to the official documentation.