DevOps & Infrastructure

Kubernetes in the Browser: Webernetes, ngrok’s TypeScript Port

1 July 2026 Mehdi 06:52
Kubernetes dans le navigateur

Kubernetes in the browser is the kind of headline that makes you raise an eyebrow. And yet, that’s exactly what Sam Rose, an engineer at ngrok, pulled off in two months with a project called webernetes. Here’s what it actually involves, and why it’s worth a closer look.

Kubernetes in the Browser: What Are We Actually Talking About?

Webernetes is not a simulation or a mockup. It’s a partial but functional port of Kubernetes’ core components, rewritten in TypeScript to run entirely on the client side.

The result: a complete cluster running in your browser tab. Pod lifecycles, internal DNS, CIDR IP allocation, container garbage collection, Deployment and ReplicaSet tracking. All of it, in the browser, with no remote server.

The project comes in at nearly 100,000 lines of TypeScript (excluding comments and the demo app), spread across 552 commits in 629 files.

What Webernetes Ports, and What It Doesn’t

The first question everyone asks: is this a WebAssembly compilation of Kubernetes? The answer is no, and the reasoning is solid.

A simple Go “hello world” program compiled to WASM weighs around 540 KB compressed. Webernetes, by comparison, comes in at just 140 KB compressed. Compiling all of Kubernetes to WASM would have meant shipping several megabytes, not to mention syscalls that are incompatible with the browser environment.

Instead, webernetes implements:

  • A partial port of the kubelet binary, sufficient to run and probe pods.
  • Several Kubernetes controllers: scheduler, namespace controller, kube-proxy, deployment controller.
  • A simulated container network interface (CNI) for inter-pod communication.
  • A browser-based container runtime, communicating via the CRI interface.
  • An API compatible with the official kubernetes-client/javascript client.

On the other hand, webernetes doesn’t yet support ConfigMaps, Secrets, pod resources, persistent volumes, or other advanced features. The author is upfront about this: these are deliberate gaps, to be filled as needs arise.

The Image Registry: A Controlled Constraint

Webernetes doesn’t pull images from Docker Hub or a remote registry. Instead, it ships its own browser registry. Images are defined directly in TypeScript by extending a base class.

This approach is consistent with the stated goal: creating interactive educational content about Kubernetes. Not a production replacement, but a tool to illustrate concepts for a technical audience.

LLMs and Code Review: The Working Method

The vast majority of the webernetes codebase was generated by LLMs (Codex and Claude, according to the published graphs). Sam Rose is transparent about this, and he anticipates the skepticism.

His answer comes down to two practices:

  1. Line-by-line review of every generated file, with direct comparison against the upstream Kubernetes Go code.
  2. A behavioral test suite: the same tests run against a real k3s cluster and against webernetes, simply swapping the execution environment.

At the time of publication, the project had 204 integration tests and 1,855 unit tests, the majority of which are direct ports of Kubernetes’ Go tests.

LLMs showed recurring weaknesses: silently omitting test cases, replacing specialized cache structures with plain Map objects, creating utility functions that didn’t exist in the original. Manual review was the primary safety net.

Total LLM token costs over nine weeks reached significant sums, peaking at over $1,800 in the final week alone, during a sprint to implement Deployment support in the demo app. Sam Rose himself notes that token efficiency that last week was poor.

Use Cases: Education and Interactive Content

The primary goal is explicitly pedagogical. Webernetes lets technical content creators build interactive demos of Kubernetes concepts directly in a web page, without requiring users to spin up a cluster.

It’s a clear niche, and it fits naturally with ngrok’s positioning in the networking and tunneling ecosystem. The project is available as open source on the GitHub repository ngrok/webernetes.

Key Takeaways

  • Webernetes is a partial but functional TypeScript port of Kubernetes, running entirely in the browser without WebAssembly.
  • It reproduces the essential primitives: pods, cluster DNS, simulated networking, Deployments, ReplicaSets, garbage collection.
  • The LLM-with-manual-review approach, backed by a dual test suite (k3s vs. browser), is the project’s central quality guarantee.
  • The stated goal is educational: producing interactive Kubernetes content, not a production substitute.
  • The source code is available on GitHub, and the maintainer actively welcomes contributions.

If you work on Kubernetes training or cloud-native demos, webernetes is clearly worth a try. Questions about integrating it into your DevOps workflows or training toolset? Drop them in the comments or follow the blog for the next deep dives.

Sources

Further Reading

Leave a comment

Your email address will not be published. Required fields are marked *