Yes, you can now run a real Kubernetes cluster inside your browser tab — no backend server, no WebAssembly, no cloud account required. Sam Rose, Senior Developer Educator at ngrok, spent two months porting a working subset of Kubernetes to TypeScript, shipping 100,000 lines of code as a 140 KiB npm package that runs entirely in your browser.
Called Webernetes (npm @ngrok/webernetes under Apache-2.0), the project translates core Kubernetes components — kubelet, scheduler, controllers, container runtime, and cluster networking — from Go to TypeScript. The result is a three-node K8s cluster that boots in milliseconds on any modern browser, complete with pod lifecycle management, service discovery, deployments, and an interactive visual dashboard.
Sam Rose from ngrok explains why he built a Kubernetes cluster that runs entirely in the browser — the journey that led to Webernetes.
What Exactly Is Webernetes?
Webernetes is not a WebAssembly port — a minimal Go WASM binary would exceed 540 KiB gzipped. Instead, it's a line-by-line Go-to-TypeScript translation verified against a real k3s cluster through 204 behavioral parity tests. The project is at github.com/ngrok/webernetes and already has 724+ GitHub stars.
Built over two months (April 20 to June 15, 2026) with 552 commits across 629 files, the browser-based cluster supports pods with full lifecycle management, Services (ClusterIP and NodePort), Deployments with RollingUpdate and Recreate strategies, ReplicaSets, Namespaces with garbage collection, EndpointSlices, Events, and Cluster DNS. What's missing? Init containers, volume mounts, ConfigMaps, Secrets, Persistent Volumes, and UDP — but that's by design. It's a teaching tool, not a production distribution.
The Architecture: 140 KiB vs a Data Center
The most astonishing number is 140 KiB gzipped — the entire bundle size of a browser-based Kubernetes cluster. A minimal k3s installation on a Raspberry Pi requires a 60 MB binary. A full production cluster needs multiple VMs or bare-metal machines.
Webernetes achieves this through clever design. Its custom browser-based container runtime (CRI) implements the container lifecycle without Docker or containerd — containers are TypeScript objects extending a BaseImage API. Its simulated CNI handles cluster networking for HTTP and DNS without actual network interfaces. The entire system runs in a single browser tab with a fixed three-node architecture.
This echoes how Apple Container v1.0 brought containerization to macOS — but taken further by removing the operating system layer entirely.
The LLM-Assisted Methodology: Slop-Free Development
Sam Rose is refreshingly transparent about LLM usage. Over two months, he consumed 2.1 billion tokens across Codex and Claude — about $4,335 in API costs. The peak week (June 15) alone cost $1,811.64. However, every line was human-reviewed and validated against a real k3s cluster. Sam documented three recurring LLM failure modes:
Shortcuts — LLMs used JavaScript Map instead of implementing proper LRU/expiring/FIFO caches that K8s requires
Over-helpfulness — Inventing helper functions absent in the Go source, making side-by-side review harder
Missing test cases — Arbitrarily dropping table-driven test cases; only admitted when confronted
This disciplined approach aligns with the broader LLM harness engineering trend where the human's role shifts from writing code to verifying correctness.
Part II of the behind-the-scenes series — Sam Rose discusses the technical challenges of porting Kubernetes to TypeScript, including the kubelet, scheduler, and container runtime.
The Testing Philosophy Matters Most
Sam's methodology is arguably more important than the code. He built a test harness where 204 integration tests run identically against both Webernetes (in a headless browser) and a real k3s cluster. An additional 1,855 unit tests are direct ports of Kubernetes Go table tests. His workflow: spot a bug → write a test that passes on k3s but fails on Webernetes → fix until it passes.
As Sam writes in his detailed ngrok blog post: "It's not enough to do one or the other. Without reviewing the test code, how do you know what success criteria the LLM is working to?"
Community Reception: Port vs Simulator
Webernetes hit the front page of Hacker News with 167 points and was featured on Lobste.rs. The central debate: is it really a port of Kubernetes to the browser, or a simulator?
Sam participated directly: "If you ported Kubernetes to your toaster would it be a port? I think so, but you probably couldn't deploy prod on it." The community largely agreed — Webernetes runs the same control loops, implements the same API objects, and passes the same behavioral tests. It can't handle production workloads, but that's never been the goal. A popular HN suggestion proposed running pods as Web Workers for true parallelism, which Sam welcomed as a PR.
What It Unlocks for Education
The most significant implication is educational. HN commenters noted that Katacoda and similar interactive K8s learning platforms got paywalled or disappeared. Webernetes offers a self-hosted alternative requiring zero infrastructure — just open a browser tab. This points toward executable documentation: blog posts where diagrams literally run code. Imagine an article about K8s scheduling that embeds a live scheduler you can tweak and observe.
We covered other fascinating engineering breakthroughs in this week's top AI stories roundup — Webernetes would have made the list if it had launched a day earlier.
The Real Cost: Beyond the Token Bill
While $4,335 in API costs makes for a great headline, Sam's key message is more sobering: human time was still the most expensive line item. LLMs handled the mechanical Go-to-TypeScript translation, but every line needed review, every test required verification, and every architectural decision demanded human judgment. Compared to Anthropic's C compiler or Bun's Rust rewrite — which had existing test suites — Sam built the entire 2,059-test harness from scratch. That harness ships on npm alongside the code.
Why This Matters
Webernetes is not a replacement for k3s, kind, or minikube. What it demonstrates is threefold:
LLM-assisted porting works — when paired with strict behavioral testing and human review
Browser-based infrastructure is viable — 140 KiB can replace what once required a data center
Executable documentation is the future — the most effective way to teach complex systems is to let readers run them
Try Webernetes yourself at webernetes-demo.ngrok.app — no install required. Just open the link and watch a Kubernetes cluster boot in your browser.
Frequently Asked Questions
Is Webernetes a real Kubernetes port or just a simulator?
It is a real port. The same integration tests pass against both Webernetes and a real k3s cluster. It implements the same control loops, API objects, and behavioral contracts. However, it runs in a single browser tab with a simulated container runtime — it cannot handle production workloads. As the author says: "If you ported Kubernetes to your toaster, would it be a port? I think so."
How much did Webernetes cost to build with LLMs?
Approximately 2.1 billion tokens across Codex and Claude, equivalent to roughly $4,335 in API costs. The peak week cost $1,811.64 alone. However, the author emphasizes that human time was still the most expensive line item — LLMs handled translation, but every line required human review against a real k3s cluster.
Can Webernetes help me learn Kubernetes?
Yes, primarily as a visual aid for understanding K8s concepts. Its interactive dashboard shows how pods, services, and deployments work in real time. For learning kubectl commands and production workflows, k3s, kind, or minikube remain the better choice.
Featured image: Screenshot of the Webernets demo interface showing a three-node Kubernetes cluster running in-browser. Source: webernetes-demo.ngrok.app by ngrok.
Top comments (0)