https://github.com/kubetail-org/kubetail
Real-time logging dashboard for Kubernetes (browser/terminal)
https://github.com/kubetail-org/kubetail
dashboard kubernetes logging monitoring private real-time
Last synced: 2 days ago
JSON representation
Real-time logging dashboard for Kubernetes (browser/terminal)
- Host: GitHub
- URL: https://github.com/kubetail-org/kubetail
- Owner: kubetail-org
- License: apache-2.0
- Created: 2024-02-12T11:32:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-15T12:39:47.000Z (3 days ago)
- Last Synced: 2025-05-15T13:45:39.524Z (3 days ago)
- Topics: dashboard, kubernetes, logging, monitoring, private, real-time
- Language: Go
- Homepage: https://www.kubetail.com
- Size: 2.67 MB
- Stars: 1,082
- Watchers: 5
- Forks: 41
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-ops - kubetail-org/kubetail - 2.0|823|2024-02-12|2025-05-06 | 一个通用的 Kubernetes 日志仪表板,可以暴漏在浏览器当中查看。 | (K8S-Tools)
- awesome-starred - kubetail-org/kubetail - Real-time logging dashboard for Kubernetes (browser/terminal) (Go)
README
# Kubetail
_Kubetail is a real-time logging dashboard for Kubernetes (browser/terminal)_
Demo: [https://www.kubetail.com/demo](https://www.kubetail.com/demo)
![]()
[](https://join.slack.com/t/kubetail/shared_invite/zt-2cq01cbm8-e1kbLT3EmcLPpHSeoFYm1w)
[](https://artifacthub.io/packages/search?repo=kubetail)
[](CODE_OF_CONDUCT.md)## Introduction
**Kubetail** is a general-purpose logging dashboard for Kubernetes, optimized for tailing logs across across multi-container workloads in real-time. With Kubetail, you can view logs from all the containers in a workload (e.g. Deployment or DaemonSet) merged into a single, chronological timeline, delivered to your browser or terminal.
The primary entry point for Kubetail is the `kubetail` CLI tool, which can launch a local web dashboard on your desktop or stream raw logs directly to your terminal. Behind the scenes, Kubetail uses your cluster's Kubernetes API to fetch logs directly from your cluster, so it works out of the box without needing to forward your logs to an external service first. Kubetail also uses your Kubernetes API to track container lifecycle events in order to keep your log timeline in sync as containers start, stop or get replaced. This makes it easy to follow logs seamlessly as user requests move from one ephemeral container to another across services.
Our goal is to build the most powerful, user-friendly logging platform for Kubernetes and we'd love your input. If you notice a bug or have a suggestion please create a GitHub Issue or send us an email ([email protected])!
## Features
* Clean, easy-to-use interface
* View log messages in real-time
* Filter logs by:
* Workload (e.g. Deployment, CronJob, StatefulSet)
* Absolute or relative time range
* Node properties (e.g. availability zone, CPU architecture, node ID)
* Grep
* Uses your Kubernetes API to retrieve log messages so data never leaves your possession (private by default)
* Web dashboard can be installed on desktop or in cluster
* Switch between multiple clusters (Desktop-only)## Quickstart (Desktop)
### Option 1: Package Manager
First, install the Kubetail CLI tool (`kubetail`) via your favorite package manager:
```console
# Homebrew
brew install kubetail# Winget
winget install Kubetail.Kubetail
```Next, start the web dashboard using the `serve` subcommand:
```console
kubetail serve
```This command will open [http://localhost:7500/](http://localhost:7500/) in your default browser. Have fun tailing your logs!
### Option 2: Shell
First, download and run the install script:
```console
curl -sS https://www.kubetail.com/install.sh | bash
```Next, start the web dashboard using the `serve` subcommand:
```console
kubetail serve
```This command will open [http://localhost:7500/](http://localhost:7500/) in your default browser. Have fun tailing your logs!
### Option 3: Binaries
Download the binary for your OS/Arch (from the latest [release binaries](https://github.com/kubetail-org/kubetail/releases/latest)):
* Darwin ([amd64](https://github.com/kubetail-org/kubetail/releases/latest/download/kubetail-darwin-amd64), [arm64](https://github.com/kubetail-org/kubetail/releases/latest/download/kubetail-darwin-arm64))
* Linux ([amd64](https://github.com/kubetail-org/kubetail/releases/latest/download/kubetail-linux-amd64), [arm64](https://github.com/kubetail-org/kubetail/releases/latest/download/kubetail-linux-arm64))
* Windows ([amd64](https://github.com/kubetail-org/kubetail/releases/latest/download/kubetail-windows-amd64), [arm64](https://github.com/kubetail-org/kubetail/releases/latest/download/kubetail-windows-arm64))Rename the file and make it executable:
```console
mv kubetail
chmod a+x kubetail
```Next, start the web dashboard using the `serve` subcommand:
```console
kubetail serve
```This command will open [http://localhost:7500/](http://localhost:7500/) in your default browser. Have fun tailing your logs!
## Quickstart (Cluster)
### Option 1: Helm
First, add the Kubetail org's chart repository, then install the "kubetail" chart:
```console
helm repo add kubetail https://kubetail-org.github.io/helm-charts/
helm install kubetail kubetail/kubetail --namespace kubetail-system --create-namespace
```For more information on how to configure the helm chart, see the chart's [values.yaml](https://github.com/kubetail-org/helm-charts/blob/main/charts/kubetail/values.yaml) file.
To access the web dashboard you can expose it as an ingress using the chart or you can use your usual access methods such as `kubectl port-forward`:
```console
kubectl port-forward -n kubetail-system svc/kubetail-dashboard 8080:8080
```Visit [http://localhost:8080](http://localhost:8080). Have fun tailing your logs!
### Option 2: YAML Manifest
First, create a namespace for the Kubetail resources:
```console
kubectl create namespace kubetail-system
```Next, choose your authentication mode (`cluster` or `token`) and apply the latest manifest file:
```console
# For cluster-based authentication use kubetail-clusterauth.yaml:
kubectl apply -f https://github.com/kubetail-org/helm-charts/releases/latest/download/kubetail-clusterauth.yaml# For token-based authentication use kubetail-tokenauth.yaml:
kubectl apply -f https://github.com/kubetail-org/helm-charts/releases/latest/download/kubetail-tokenauth.yaml
```To access the web dashboard you can use your usual access methods such as `kubectl port-forward`:
```console
kubectl port-forward -n kubetail-system svc/kubetail-dashboard 8080:8080
```Visit [http://localhost:8080](http://localhost:8080). Have fun tailing your logs!
### Option 3: Glasskube
To install Kubetail using [Glasskube](https://glasskube.dev/), you can select "Kubetail" from the "ClusterPackages" tab in the Glasskube GUI then click "install" or you can run the following command:
```console
glasskube install kubetail
```Once Kubetail is installed you can use it by clicking "open" in the Glasskube GUI or by using the `open` command:
```console
glasskube open kubetail
```Have fun tailing your logs!
## Documentation
Visit the [Kubetail documentation](https://www.kubetail.com/)
## Development
### Repository Structure
This monorepo contains the following modules:
* Kubetail CLI ([modules/cli](modules/cli))
* Kubetail Cluster API ([modules/cluster-api](modules/cluster-api))
* Kubetail Cluster Agent ([modules/cluster-agent](modules/cluster-agent))
* Kubetail Dashboard ([modules/dashboard](modules/dashboard))It also contains the source code for the Kubetail Dashboard's frontend and the Rust binary that powers log search:
* Dashboard UI ([dashboard-ui](dashboard-ui))
* rgkl ([crates/rgkl](crates/rgkl))### Setting up the Development Environment
#### Dependencies
* [Tilt](https://tilt.dev/)
* [Go](https://go.dev/)
* [pnpm](https://pnpm.io/)
* [ctlptl](https://github.com/tilt-dev/ctlptl) (optional)#### Next steps
1. Create a Kubernetes Dev Cluster
```console
ctlptl apply -f hack/ctlptl/minikube.yaml
```You can use any type of cluster that [works with Tilt](https://docs.tilt.dev/choosing_clusters.html).
2. Start the dev environment:
```console
tilt up
```3. Start the Dashboard server:
```console
cd modules/dashboard
go run cmd/main.go -c hack/config.yaml
```4. Run the Dashboard UI locally:
```console
cd dashboard-ui
pnpm install
pnpm dev
```Now access the dashboard at [http://localhost:5173](http://localhost:5173).
### Optimize Development Environment for Rust (Optional)
By default, the dev environment compiles "release" builds of the Rust components when you run run `tilt up`. If you want to iterate more quickly, you can have Tilt compile the rust code locally using "debug" builds instead.
#### Dependencies
* [rustup](https://rustup.rs)
* [protobuf](https://protobuf.dev/installation/)#### Next steps
First, install the Rust target required for your architecture:
```console
# x86_64
rustup target add x86_64-unknown-linux-musl# aarch64
rustup target add aarch64-unknown-linux-musl
```Next, install the tools required by Rust cross compiler:
```console
# macOS (Homebrew)
brew install FiloSottile/musl-cross/musl-cross# Linux (Ubuntu)
apt-get install musl-tools
```On macOS, add this to your `~/.cargo/config.toml` file:
```
[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
```Finally, to use the local compiler, just run Tilt using using the `KUBETAIL_DEV_RUST_LOCAL` env flag:
```console
KUBETAIL_DEV_RUST_LOCAL=true tilt up
```## Build
### CLI Tool
To build the Kubetail CLI tool executable (`kubetail`), run the following command:
```console
make
```When the build process finishes you can find the executable in the local `bin/` directory.
### Dashboard
To build a docker image for a production deployment of the Kubetail Dashboard server, run the following command:
```console
docker build -f build/package/Dockerfile.dashboard -t kubetail-dashboard:latest .
```### Cluster API
To build a docker image for a production deployment of the Kubetail Cluster API server, run the following command:
```console
docker build -f build/package/Dockerfile.cluster-api -t kubetail-cluster-api:latest .
```### Cluster Agent
To build a docker image for a production deployment of the Kubetail Cluster Agent, run the following command:
```console
docker build -f build/package/Dockerfile.cluster-agent -t kubetail-cluster-agent:latest .
```## Get Involved
We're building the most **user-friendly**, **cost-effective**, and **secure** logging platform for Kubernetes and we'd love your contributions! Here's how you can help:
* UI/UX design
* React frontend development
* Reporting issues and suggesting featuresReach us at [email protected], or join our [Discord server](https://discord.gg/CmsmWAVkvX) or [Slack channel](https://join.slack.com/t/kubetail/shared_invite/zt-2cq01cbm8-e1kbLT3EmcLPpHSeoFYm1w).