https://github.com/umegbewe/kubectl-multilog
Stream tailed logs across containers, pods and clusters
https://github.com/umegbewe/kubectl-multilog
kubectl kubectl-plugin kubectl-plugins kubernetes
Last synced: about 1 year ago
JSON representation
Stream tailed logs across containers, pods and clusters
- Host: GitHub
- URL: https://github.com/umegbewe/kubectl-multilog
- Owner: umegbewe
- License: mit
- Created: 2023-06-24T11:24:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-15T16:35:11.000Z (over 1 year ago)
- Last Synced: 2025-04-12T15:05:58.557Z (about 1 year ago)
- Topics: kubectl, kubectl-plugin, kubectl-plugins, kubernetes
- Language: Go
- Homepage:
- Size: 86.9 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubectl-multilog
CLI tool for real-time streaming of logs from multiple Kubernetes pods.
## Demo
[](https://asciinema.org/a/593139)
## Features
* Real-time streaming of logs from selected pods and containers.
* Fetch logs across multiple clusters
* Color-coding to differentiate logs from different pods/containers.
* ~~Fetch logs based on timestamps (sinceSeconds or sinceTime).~~
* Supports logs from init containers.
## Building
To build `kubectl-multilog`, you need Go installed on your machine. You can then build the binary using the following command:
```bash
go build -o kubectl-multilog
```
Move the binary to a directory in your `PATH`, you might need to run this with sudo
```bash
mv kubectl-multilog /usr/local/bin
```
## Usage
Here's how to use the :
``kubectl multilog --help``
```
--kubeconfig --context --namespace --selector --init-containers --previous
```
Options:
`kubeconfig:` Path to the kubeconfig file. Defaults to ~/.kube/config.
`context:` Optional, seperated by commas
`namespace:` Kubernetes namespace to use. Defaults to default.
`selector:` Label selector to filter the pods.
`init-containers:` Whether to include init containers. Defaults to false.
`previous:` Whether to include previous terminated containers. Defaults to false.
`container:` Specific container to fetch logs from within a pod.
~~`since:` Fetch logs since a specific point in time or duration (e.g., 5m for last five minutes).~~
## Contributing
Contributions are welcome! Please submit a pull request or create an issue to contribute to this project.
## License
This project is licensed under the [MIT License](https://github.com/umegbewe/kubectl-multilog/blob/main/README.md).