K8Lens
4.2k stars
—  HOW IT WORKS

A single binary that talks
to your API server.

No agents to deploy. No metrics scraping. K8Lens reads what Kubernetes already exposes - and watches the API for changes, so the UI is always live.

YOUR BROWSER
Next.js UI
React · TypeScript
WebSocket
K8LENS · 1 CONTAINER
HTTP / WebSocketGateway
Auth & SessionsOIDC optional
Watch multiplexerper kind
client-go cachereflector + informer
WATCH
KUBERNETES CLUSTER
CONTROL PLANE
kube-apiserver
STATE
etcd
WORKER NODES · YOUR WORKLOADS
—  TWO WAYS TO RUN IT

Pick the mode that fits.

MODE A · LOCAL

Out-of-cluster

Run K8Lens on your laptop or a jumphost. Mount a kubeconfig, switch contexts freely. Best for ops engineers managing many clusters.

$ docker run -d -p 8080:8080 \
$ -v ~/.kube:/root/.kube:ro \
$ k8lens/k8lens:v0.4.2
Multi-cluster context switcher
Read-only kubeconfig mount
No cluster modifications
MODE B · IN-CLUSTER

Inside Kubernetes

Apply the manifest. K8Lens runs as a deployment with a service account scoped to whatever you grant it. Best for teams sharing one dashboard.

$ kubectl apply -f \
$ https://k8lens.dev/install.yaml
$ kubectl -n k8lens-system port-forward \
$ svc/k8lens 8080:80
Single Deployment + Service
RBAC-scoped ServiceAccount
Ingress-ready
—  ANATOMY OF A REQUEST

From browser to API server.

01
Browser
WebSocket + REST

Next.js UI subscribes over WebSocket and falls back to REST.

02
K8Lens server
Go reverse-proxy

Authenticates the session, multiplexes watches, batches updates.

03
Client-go cache
Reflector + informer

Maintains a hot cache of every resource the user has access to.

04
Kubernetes API
apiserver

Watch and list/get requests with the kubeconfig credentials.

05
Etcd
Source of truth

K8Lens never touches etcd directly - only via the API server.