How kubetail-org/kubetail works
Kubetail is a Kubernetes log-tail platform: users start the dashboard or terminal workflow, select workloads and time/source filters, retrieve container logs and follow changing containers, then inspect a chronological merged stream. The dashboard UI communicates with the dashboard GraphQL endpoint; the dashboard uses Kubernetes connections for core data and can proxy advanced requests to the separately installable Cluster API and Cluster Agent. The CLI also offers direct terminal log streaming and Cluster API lifecycle commands. README documents search, metadata, and system-log capabilities beyond the sampled implementation; their precise resolver wiring is not shown here.
Main entry points: cmd Kubetail CLI · graph/server.go Dashboard GraphQL · graph/server.go Cluster API GraphQL · connection-manager.go Kubernetes connections
Components 22
User entry points
- Kubetail CLI
modules/cli/cmd - CLI log commands
modules/cli/cmd/logs.go - Cluster API client
modules/cli/internal/clusterapi/client.go - Cluster operations
modules/cli/cmd/cluster.go
Dashboard experience
- Dashboard app
modules/dashboard/pkg/app/app.go - UI routes
dashboard-ui/src/routes.tsx - Workload home
dashboard-ui/src/pages/home - Log console
dashboard-ui/src/pages/console - Log viewer
dashboard-ui/src/components/widgets/log-viewer - Dashboard GraphQL
modules/dashboard/graph/server.go - Dashboard operations
dashboard-ui/src/lib/graphql/dashboard/ops.ts - Cluster API proxy
modules/dashboard/internal/cluster-api/proxy.go - User preferences
modules/dashboard/pkg/preferences/store.go
Log retrieval
- Kubernetes connections
modules/shared/k8shelpers/connection-manager.go - Log fetching and streams
modules/shared/logs
Cluster API services
- Cluster API GraphQL
modules/cluster-api/graph/server.go - Cluster API app
modules/cluster-api/internal/app/app.go - Cluster Agent
crates/cluster_agent/src/main.rs - Log metadata
crates/cluster_agent/src/log_metadata.rs - Log records
crates/cluster_agent/src/log_records.rs
Other components
- User
- Kubernetes API
Connections 26
- User → Kubetail CLI: runs command
- User → UI routes: opens dashboard
- Kubetail CLI → Dashboard app: starts server
- UI routes → Workload home: routes home
- UI routes → Log console: routes console
- Workload home → Dashboard operations: requests workload data
- Log console → Dashboard operations: requests log data
- Dashboard operations → Dashboard GraphQL: sends GraphQL
- Dashboard app → Dashboard GraphQL: mounts endpoint
- Dashboard GraphQL → Kubernetes connections: uses connections
- Kubernetes connections → Kubernetes API: reads cluster data
- Log console → Log viewer: renders stream
- Kubetail CLI → CLI log commands: dispatches logs
- CLI log commands → Log fetching and streams: fetches and streams
- Log fetching and streams → Kubernetes connections: queries Kubernetes
- Dashboard GraphQL → Cluster API proxy: forwards advanced requests
- Cluster API proxy → Cluster API GraphQL: proxies GraphQL
- Cluster API app → Cluster API GraphQL: mounts endpoint
- Cluster API GraphQL → Kubernetes connections: uses connections
- Cluster API GraphQL → Cluster Agent: dispatches agent requests
- Cluster Agent → Log metadata: serves metadata
- Cluster Agent → Log records: serves records
- Dashboard GraphQL → User preferences: persists settings
- Kubetail CLI → Cluster API client: calls API client
- Kubetail CLI → Cluster operations: dispatches cluster commands
- Cluster operations → Cluster API client: manages Cluster API