kubetail / dashboard
CLAUDE.md1.8k starsChanged 3 days agoApache-2.0View on GitHub
A Go/Gin HTTP server: the built UI, a GraphQL API over the Kubernetes API (gqlgen), REST routes for sessions and downloads, and the proxy to the Cluster API. It runs as its own binary in the cluster (cmd/main.go) and inside the CLI for kubetail serve. The root guide's Go modules › Checks holds the commands every Go module shares. Keep this section in step with the one in README.md. While working: After editing libs/graphql/dashboard/schema.graphqls: Before you push: CI also runs…
Trending
Quiet since October.about the whole repository
Who's talking about kubetail-org/kubetail
- A Hacker News story“Show HN: Kubetail – Real-time log search for Kubernetes”Hacker News · May 1, 2025 · 126 points
- A Hacker News story“Show HN: Kubetail – Web-based real-time log viewer for Kubernetes”Hacker News · Feb 13, 2024 · 70 points
- @damyr.fr“Sur Kube tu as github.com/kubetail-org..., mais le graph d'event manque faut avouer”Bluesky · May 26, 2025 · 4 likes
- @matsuu.bsky.social“k8sのログをブラウザ経由で参照できるダッシュボード実装。pod単位のほか、deploymentやdaemonsetの単位で複数Podのログをまとめてのリアルタイム表示もできる。正規表現による絞り込みも可。”Bluesky · May 4, 2025 · 4 likes
- @chrisshort.net“kubetail-org/kubetail: Real-time logging dashboard for Kubernetes. View logs in a terminal or a browser. …”Bluesky · May 22, 2026 · 1 likes
The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 27
Talked about on GitHub, Bluesky and Hacker News (27 times).
On GitHub · 20
- Oct 24, 2025🐋 Release kubetail-0.15.4 — kubetail-org/helm-charts1 reaction
- Oct 22, 2026chore(deps): update kubetail to v0.18.1 — uniget-org/tools0 reactions · 2 comments
- Jul 13, 2026💎 Knowledge Update & Optimization: 13 Jul 2026 — nubenetes/awesome-kubernetes0 reactions · 40 comments
- Jul 12, 2026💎 Knowledge Update & Optimization: 12 Jul 2026 — nubenetes/awesome-kubernetes0 reactions · 40 comments
- Jul 12, 2026💎 Knowledge Update & Optimization: 12 Jul 2026 — nubenetes/awesome-kubernetes0 reactions · 40 comments
15 more on GitHub
- Jun 25, 2026x/vulndb: potential Go vuln in github.com/kubetail-org/kubetail/modules/cli: GHSA-v8j7-hp7c-738f — golang/vulndb0 reactions · 1 comment
- Feb 5, 2026feat(kubetail): add package — brioche-dev/brioche-packages0 reactions
- Dec 8, 2025add kubetail — ai-solution-eng/frameworks0 reactions
- Oct 4, 2025feat: add kubetail plugin — asdf-vm/asdf-plugins0 reactions
- Sep 28, 2025Add kubetail plugin — kubernetes-sigs/krew-index0 reactions · 8 comments
- Sep 26, 2025new naming conflict with a project — johanhaleby/kubetail0 reactions · 2 comments
- Sep 19, 2025dev-util/kubetail-bin: add 0.7.5, 0.8.2 — gentoo/gentoo0 reactions · 6 comments
- Sep 18, 2025[Request]: kubetail — ScoopInstaller/Main0 reactions · 1 comment
- Jul 11, 2025🎣 Patch release — kubetail-org/helm-charts0 reactions
- Jul 9, 2025Add Real-Time Log Streaming with Kubetail — kubestellar/ui0 reactions · 5 comments
- Jun 21, 2025TypeScript definitions missing in v8 — nmn/react-timeago0 reactions · 1 comment
- May 21, 2025kubetail-org/kubetail: 一个通用的 Kubernetes 日志仪表板,可以暴漏在浏览器当中查看。 — awesome-ops/awesome-ops.github.io0 reactions
- May 20, 2025Integrate Kubetail graphical Logs for pods and jobs into Kubestellar — kubestellar/ui0 reactions · 9 comments
- May 2, 2025Vendoring a package using "local" imports from another directory? — openSUSE/obs-service-go_modules0 reactions
- Feb 2, 2025new addon: kubetail — kubernetes/minikube0 reactions · 26 comments
On Bluesky · 5
- May 26, 2025Sur Kube tu as github.com/kubetail-org..., mais le graph d'event manque faut avouer — @damyr.fr4 likes and reposts · 1 reply
- May 4, 2025k8sのログをブラウザ経由で参照できるダッシュボード実装。pod単位のほか、deploymentやdaemonsetの単位で複数Podのログをまとめてのリアルタイム表示もできる。正規表現による絞り込みも可。 — @matsuu.bsky.social4 likes and reposts
- May 22, 2026kubetail-org/kubetail: Real-time logging dashboard for Kubernetes. View logs in a terminal or a browser. Run anywhere - desktop, cluster,… — @chrisshort.net1 likes and repost
- May 1, 2025Show HN: Kubetail – Real-time log search for Kubernetes Hi Everyone! Kubetail is a general-purp... https://github.com/kubetail-org/kubetail… — @kubernetes.activitypub.awakari.com.ap.brid.gy1 likes and repost
- Feb 13, 2024Show HN: Kubetail – Web-based real-time log viewer for Kubernetes Discussion — @hn100.bsky.social1 likes and repost
On Hacker News · 2
- May 1, 2025Show HN: Kubetail – Real-time log search for Kubernetes126 points · 35 comments
- Feb 13, 2024Show HN: Kubetail – Web-based real-time log viewer for Kubernetes70 points · 33 comments
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cli/CLAUDE.mdCLAUDE.md
- e2e/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- release-cliSkill
- release-clusterSkill
- release-desktopSkill
- release-notesSkill
- release-versionSkill
The file
Files
dashboard — Dashboard backend
A Go/Gin HTTP server: the built UI, a GraphQL API over the Kubernetes API (gqlgen), REST routes for sessions and downloads, and the proxy to the Cluster API. It runs as its own binary in the cluster (cmd/main.go) and inside the CLI for kubetail serve.
pkg/appandpkg/configare the CLI's API.cli/cmd/serve.gocallsconfig.DefaultConfig,app.NewApp,NotifyShutdown,DrainWithContextandClose. A change to those signatures, or to a default inDefaultConfig, changeskubetail serve.pkg/app/app.gois the composition root and holds every route.internal/cluster-api/is packageclusterapi. Hand-written GraphQL code sits ingraph/schema.helpers.goandgraph/model/models_custom.go.- A schema or resolver change follows
libs/graphql/CLAUDE.md. website/is the built UI, copied in bymake build-dashboard-ui; git tracks only.gitkeep. Without it every page route answers 404website not found, and the API still works.
Checks
The root guide's Go modules › Checks holds the commands every Go module shares. Keep this section in step with the one in README.md.
While working:
make vet-cli test-cli # from the repo root: what the change reaches, with cli/After editing libs/graphql/dashboard/schema.graphqls:
go generate ./... # gqlgen
cd ../apps/web && pnpm graphql-codegen # the UI's typesBefore you push:
make lint-cli vet-cli test-cli cover-cli # from the repo root, with cli/CI also runs make staticcheck-cli.
The CLI and the Dashboard share a coverage area, as CI measures them: FULL=1 runs the CLI's tests too, which reach Dashboard lines of their own.
Config
pkg/config.NewConfig reads the file, expands ${VAR} from the environment (the only way an environment variable reaches the config), and unmarshals over DefaultConfig(), the truth for defaults: the cluster environment on :8080. Keys are flat and top-level. A new key gets a mapstructure tag, a default there, a validation tag where it can be wrong, and an entry in config/default/dashboard.yaml.
Routes
Routes mount under cfg.BasePath. NewApp builds three nested groups, and which group a route joins decides what protects it:
| Group | Middleware it adds, in order | Routes |
root | none | health, static assets, /graphiql, and the SPA shell on / and every unmatched path |
dynamicRoutes | session cookie, security headers, csrfProtectionMiddleware, authenticationMiddleware | /api/auth/* |
protectedRoutes | k8sAuthenticationMiddleware, websocketCSRFContextMiddleware | /graphql, /cluster-api-proxy/*path, POST /api/v1/download |
authenticationMiddlewarefinds the token: the session cookie inauth-mode: token, or anAuthorization: Bearerheader in either mode, which wins.k8sAuthenticationMiddlewareenforces it: 401 intokenmode without one, and it puts the token on the request context underk8shelpers.K8STokenCtxKey.- In
auth-mode: autoa request with no token runs as the process: the kubeconfig user indesktop, the Dashboard's ServiceAccount incluster.
Kubernetes access
- Kubernetes clients come from the
App's onek8shelpers.ConnectionManager, with three exceptions that use credentials of their own: the Helm client (desktoponly), the health monitor's aggregator clientset, and the authorizer's review client. - A resolver that takes
kubeContextstarts withr.cm.DerefKubeContext(kubeContext)and passes the result down. Inclusterthe result is always""; a non-empty kube context handed to the connection manager directly is an error. - Namespaces go through the allow-list. A get calls
k8shelpers.DerefNamespace(r.allowedNamespaces, namespace, default). A list or a watch goes throughr.listResourceorr.watchResourceMulti. An omitted namespace is the context's default; the empty string means all, which with an allow-list fans out across the allowed namespaces. Anything built from source paths passeslogs.WithAllowedNamespaces(r.allowedNamespaces). cm.NewInformeralways gets the request's token: its access review is the only thing between a caller and a shared informer's data. → ADR: share informers and gate each caller with an access review- Logs are read from the Kubernetes API here (
KubeLogFetcher, the default oflogs.NewStream). This module never speaks gRPC; the agent-backed path is the Cluster API's, which the browser reaches through the proxy. - An operation that exists in
desktopalone returnsErrForbiddenincluster(kubeConfigGet,helmListReleases…). A new one does the same.
The Cluster API proxy
/cluster-api-proxy/* forwards to /apis/api.kubetail.com/v1 on the kube-apiserver, never to the Cluster API's Service. DesktopProxy takes the kube context from the first path segment and authenticates with that context's kubeconfig credentials. InClusterProxy sends the session's token as Authorization, or falls back to the Dashboard's ServiceAccount. With cluster-api-enabled: false in cluster the route is a 503 stub. HealthMonitor maps the Available condition of the APIService v1.api.kubetail.com to the status the UI shows.
Security invariants
What an ordinary change here can break, beside the root guide's list:
- A route on
roothas no session, no CSRF check and no authentication. Anything that reads or changes a user's data joinsdynamicRoutesorprotectedRoutes. The tests inpkg/app/app_test.gofind the middleware by function name, so renaming one fails them. - CSRF is two layers (
csrfProtectionMiddleware): a request whoseSec-Fetch-Siteiscross-siteorsame-siteis refused, thenX-CSRF-Token, or a form post'scsrfTokenfield, must equal the session's token, compared in constant time. GET, HEAD and OPTIONS are skipped, so the GraphQL server has no GET transport and no GET route changes state. → ADR: defend against CSRF in two layers - A WebSocket is gated twice:
CheckOrigin(same origin, orallowed-origins; a missingOriginis refused) and theconnection_initpayload'scsrfToken. The same-origin check ignoresX-Forwarded-*; a deployment behind a proxy setsallowed-origins. - The proxies strip what the caller must not choose:
Origin,Authorization,X-Forwarded-Authorizationand everyImpersonate-*header are deleted before forwarding, a path with a..segment is refused before it is joined, and an upgrade is refused unless its origin is allowed and it carries the forwarded CSRF token. The Cluster API relies on each of these. → ADR: reach the Cluster API through the aggregation layer websocketCSRFContextMiddlewaredeletes a client's ownX-Forwarded-CSRF-Tokenbefore it sets the real one.- The token is trimmed before it is checked, so a whitespace-only bearer does not pass for one.
Tests
pkg/app/testutils_test.gogivesnewTestConfig()andnewTestApp(cfg), which builds the app with no connection manager and no proxy (app.cmis nil, the proxy route is the 503 stub) and amockQueryHelperswith no expectations. A test sets its expectations onapp.queryHelpersor mounts its own handler onapp.dynamicRoutesorapp.protectedRoutes.- The GraphQL server is stood up with
graph.NewServer(cfg, nil, clusterapi.NewHealthMonitor(cfg, nil))behindwithSessionCSRFTokenand dialled with agraphql-transport-wsWebSocket (graph/server_test.go). A resolver is called directly on&queryResolver{&Resolver{…}}with the fakes it needs. - Seams are fields and parameters: the dependencies
newApptakes, the health monitorgraph.NewServertakes (internal/cluster-api/mock.MockHealthMonitor),downloadHandlers.newLogStream,Resolver.helmReleaseLister, the transportnewInClusterProxytakes. - The tests to extend for a boundary:
pkg/app/middleware_test.go(CSRF),pkg/app/websocket_test.go(WebSocket CSRF end to end),internal/cluster-api/proxy_test.go(header stripping, path traversal),TestAllowedNamespacesGetQueriesingraph/schema.resolvers_test.go.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

