Kubetail

Kubetail is a real-time logging dashboard for Kubernetes (browser/terminal)

demo-thumbnail

Demo: https://www.kubetail.com/demo

slack Artifact Hub

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 (hello@kubetail.com)!

Features

Quickstart (Desktop)

Option 1: Homebrew

First, install the Kubetail CLI tool (kubetail) via homebrew:

brew install kubetail

Next, start the web dashboard using the serve subcommand:

kubetail serve

This command will open http://localhost:7500/ in your default browser. Have fun tailing your logs!

Option 2: Shell

First, download and run the install script:

curl -sS https://www.kubetail.com/install.sh | bash

Next, start the web dashboard using the serve subcommand:

kubetail serve

This command will open 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):

Rename the file and make it executable:

mv <filename> kubetail
chmod a+x kubetail

Next, start the web dashboard using the serve subcommand:

kubetail serve

This command will open 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:

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 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:

kubectl port-forward -n kubetail-system svc/kubetail-dashboard 8080:8080

Visit http://localhost:8080. Have fun tailing your logs!

Option 2: YAML Manifest

First, create a namespace for the Kubetail resources:

kubectl create namespace kubetail-system

Next, choose your authentication mode (cluster or token) and apply the latest manifest file:

# 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:

kubectl port-forward -n kubetail-system svc/kubetail-dashboard 8080:8080

Visit http://localhost:8080. Have fun tailing your logs!

Option 3: Glasskube

To install Kubetail using Glasskube, you can select "Kubetail" from the "ClusterPackages" tab in the Glasskube GUI then click "install" or you can run the following command:

glasskube install kubetail

Once Kubetail is installed you can use it by clicking "open" in the Glasskube GUI or by using the open command:

glasskube open kubetail

Have fun tailing your logs!

Documentation

Visit the Kubetail documentation

Development

Repository Structure

This monorepo contains the following modules:

It also contains the source code for the Kubetail Dashboard's frontend and the Rust binary that powers log search:

Setting up the Development Environment

Dependencies:

  1. Create a Kubernetes dev cluster:
ctlptl apply -f hack/ctlptl/minikube.yaml

You can use any type of cluster that works with Tilt.

  1. Start the dev environment:
tilt up
  1. Start the Dashboard server:
cd modules/dashboard
go run cmd/main.go -c hack/config.yaml
  1. Run the Dashboard UI locally:
cd dashboard-ui
pnpm install
pnpm dev

Now access the dashboard at http://localhost:5173.

Build

CLI Tool

To build the Kubetail CLI tool executable (kubetail), run the following command:

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:

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:

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:

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:

Reach us at hello@kubetail.com, or join our Discord server or Slack channel.