Source linked

Webernetes: 140KiB Kubernetes Cluster That Runs Entirely in Your Browser

A partial TypeScript port of Kubernetes (100k lines, 552 commits) runs real pod lifecycles, networking, and controllers in the browser without compiling to WebAssembly

ngrokweberneteskubernetesbrowser typescriptcontainer runtimellm assisted development

140KiB gzipped. That’s the total size of a working Kubernetes cluster in your browser—smaller than a trivial Go program compiled to WebAssembly (540KiB for "hello, world"). Stephen Rose from ngrok shipped webernetes, a partial port of Kubernetes to TypeScript, after 2 months and 552 commits across 629 files generating almost 100,000 lines of code.

No, Rose didn’t compile Kubernetes to WASM. That path hits compile-time errors because Kubernetes calls system-level APIs unavailable in the browser. Instead, webernetes is a from-scratch TypeScript reimplementation covering the kubelet binary, pod scheduler, deployment controller, namespace controller, kube-proxy, a container runtime interface (CRI), and a simulated container network interface (CNI). It handles pod lifecycles, cluster DNS, IP allocation, container garbage collection, and ReplicaSet tracking.

How Browser Containers Actually Work

Webernetes doesn’t pull real images from Docker Hub. It ships its own browser-based registry and a TypeScript API for defining images. You write a class extending w8s.BaseImage, implement exec(), listen on ports via ctx.listenHttp(), and register it with a cluster. Deploying a Deployment looks exactly like Kubernetes YAML—except it’s all typed JavaScript. The demo on the blog shows three pods exchanging HTTP requests with animated blue dots.

Rose built the whole thing with heavy LLM assistance, but he reviewed every line of code and wrote hundreds of tests that assert webernetes behaves identically to a real cluster. He’s candid about the skepticism around LLM-generated code but argues the review and test coverage make it legit.

What This Enables (and What It Doesn’t)

Webernetes is a teaching tool, not a production distribution. It intentionally omits ConfigMaps, Secrets, persistent volumes, and any real container runtime. The point is interactive Kubernetes content: creators can script specific workloads to illustrate scheduling, networking, or controller behavior without spinning up a real cluster. Rose plans to expand support as he builds more content, and he’s actively seeking contributors.

For engineers who build educational demos or interactive docs, webernetes offers a way to embed a fully functional control plane in a webpage. The next time you need to show someone how a Deployment rolls out replicas, just load a JavaScript module instead of provisioning a cluster.


Source: I ported Kubernetes to the browser
Domain: ngrok.com

Read original source ->

External source stays available while the OJO article and comment thread stay local.

Comments load interactively on the live page.