I read abut linux kernel webassembly port while drinking my morning coffee, a minute later I read about an oci runtime in a tab and jokingly think to myself: cool, now I can run my k8s cluster in chrome.
Interesting! I built a different take on this with a virtual cluster in your browser with a real control plane and KWOK nodes for learning K8s and replicating failure modes: https://github.com/k5njm/kubewasm
Yes, but much in the same sense that websites could already run JavaScript code before. I.e., that part isn't new, and it runs in the same sandbox, so there is no security breach.
What's new is that it runs an entire Linux kernel on it and also emulates the structure of a Kubernetes cluster - so the cluster can assign your tab workloads, route requests to it, etc.
As with all those demos where "the server sends requests to the page" instead of the usual other way around, it's probably implemented using a WebSocket or WebRTC connection to the demo's server. The page has to open that connection first, but once it's open, both page and server can exchange arbitrary messages, so that's often used to make server-driven pages.
But this means your machine is not open to receive arbitrary packets, it all has to go through that one connection.
It all doesn't really do much except contributing some bit of compute resources from your machine to their cluster while you have the tab open - and giving you a log view so you can watch it receiving requests and feel proud.
If the cluster was configured to allow any untrusted participant to run arbitrary workloads on the cluster it could then send malicious network traffic from your IP. You can’t safely assume no threat vector just because there is a sandbox involved!
My understanding was that WASM itself has no access to browser APIs, meaning it can't do network requests on its own, not even at the level permitted by the browser sandbox. You have to have supporting JavaScript to do the requests on the WASM app's behalf, which gives you the same security environment as untrusted ad code (sadly).
So it's up to the JavaScript code launching the WASM how much the WASM can do.
I think I read somewhere else here that this project doesn't expose this ability to the "pods", but instead tunnels any network requests from the emulated Linux side back to the server?
Not sure if this is correct, but it would be necessary anyway if you wanted to enable intra-cluster communication like in a real Kubernetes cluster. E.g. the code inside a pod might do something like "curl http://some-other-service.main" . In a real cluster, this would be routed to another pod where an instance of the other service is running. In this browser version, some JavaScript would have to tunnel the request through the websocket connection somehow.
Right but most websites serve code that was written and deployed by the owner of the website. Kubernetes is code that lets people upload and execute other code. Note this runs in a sandbox but its still on your machine.
I would have liked to be able to tell which node I am. None of them matched my os/browser/location combo
From what I understood of the description, it sounded like with two tabs open I should appear as one node with slots for two pods (using cross-tab coordination to determine how many pods to host in my "node"). I think something was explained poorly (or I understood it poorly) because I didn't see any node running more than one pod.
But still an incredibly cool idea! I'm assuming there is only one control plane node, running on the server, and the connectees are just worker nodes? Or is each tab its own worker node?
edit: I somehow missed the big "Join the cluster" button and assumed I was already part of it.
unkernel doesn't provide anything like p2p networking presented as a network interface, so how does unkernel help? I also suspect you'd have a easier time telling an LLM to "implement a reticulum node in browser, with webrtc as p2p transport, and a standalone server as a seed/coordinator/bridge to other transports".
(I also haven't fully grasped what sets reticulum apart from cjdns, yggdrasil, nebula, gnunet, … or is it more like iroh?)
Reticulum is quite different to the others but they do of course all overlap since they all do networking in various ways.
You might say RNS is more generic than the others because the others are all intended to run over certain connections (mainly on top of the internet) while RNS is intended to run over almost anything that connects two nodes (TCP, LoRa, WiFi, fiber, etc) without needing the internet (it's just a useful thing to make connections over).
The others are more intended to provide peer to peer connections or overlay networking on top of the internet, whereas Reticulum is meant to let you build networks across different underlying connections, with p2p connections and multi hop packet routing on top.
For unikernel Reticulum would probably be overcomplicating it, if you just want peer to peer connections over the internet.
strange idea. I haven't dared to try it yet, Im a bit scared that opening this it will suddenly connect my browser to a bunch of unknow nodes. Does a pod running in my tab send requests to the internet through my home network, or do all requests go through their server?
Check out the pre-ai version, webnetes https://github.com/pojntfx/webnetes, when things like this were actually difficult to bring to the world, through sheer will and creativity :)
I’m starting to be thankful for the obvious AI-isms in web prose. It makes it easier to point out sloppy projects without having to visit their GitHub and check the commits
Yep, you will, it has to hunt around for the other nodes that are running the chat server, give it a minute (normally about 10 tries) and it will find one
I was thinking latency between control plane nodes where things start falling apart at or beyond tens of milliseconds, while these browser tabs are worker nodes.
K8s is really just like a linux kernel for the cloud. You can deploy it basically in any way as long there is some kind of a network connection available and a microchip soldered on the PCB. A cluster with 1000 Raspberries? No problem. ESP32? If you like to suffer, why not? Of course not any deployment is sensible but I dont think browser k8s is for production.
I guess I shouldn't have been surprised to see kworker processes
... Somehow running actual containers on a Linux vm in brower tab would be even more impressive.
It's just an administrator/orchestrator for containers. If you start a docker container without kubernetes (docker/podman run) there's nothing to "orchestrate" it, as in if it crashes the kubernetes server restarts it, moves it to less loaded nodes, ties it to its storage, etc. You can even have it manage vms and other stuff.
This is assuming you know what a container is of course but you don't need to know cgroups or syscalls in depth to understand that k8s just keeps them running and moving around how you want.
It's a giant go api server in the end, "is nginx still running 3 containers? only one? start two more."
it feels for me that docker / podman is like running a computer with a single EFI app where k8s is more a linux kernel for distributed systems. The weird part is that there isnt really an easy to use mainstream distribution existing. Okay maybe portainer will become one.
I read abut linux kernel webassembly port while drinking my morning coffee, a minute later I read about an oci runtime in a tab and jokingly think to myself: cool, now I can run my k8s cluster in chrome.
Five minutes later, here we are.
Botnets can now be orchestrated in such elegant and reliable way!
I had the same thing , ive moved the goalpost to Ceph in the browser; surely that won't happen
Why not? I mean maybe not _Ceph_ but some distributed storage driver should be possible.
CookieFS
we have kubernetes in chrome tabs before rootless kubernetes as stable.
(i know it's in beta as of k8s 1.37, i know...)
Kata containers in browser was a thing too
This is a fabulous idea, but could lead to botnets without guard rails.
Quebec devs might be amused with the name
Hostie de pod!
Glad I'm not the only one who pronounced it that way
Not a Canadian, so had to look it up. It's a slur?!
Lots of holy things are slurs in various languages. Hostia in Spanish (and Quebec French), "holy shit", "fucking hell", etc.
tabarnoche
tab-ehr-NET!
Was hoping this would be more on the tabernac side of things
Cool it, my mother is in the room
Tabern'ACK'd
Interesting! I built a different take on this with a virtual cluster in your browser with a real control plane and KWOK nodes for learning K8s and replicating failure modes: https://github.com/k5njm/kubewasm
Help me understand. Now by visiting a page I can join a botnet and they can run any code on my machine (not just JavaScript)?
Yes, but much in the same sense that websites could already run JavaScript code before. I.e., that part isn't new, and it runs in the same sandbox, so there is no security breach.
What's new is that it runs an entire Linux kernel on it and also emulates the structure of a Kubernetes cluster - so the cluster can assign your tab workloads, route requests to it, etc.
As with all those demos where "the server sends requests to the page" instead of the usual other way around, it's probably implemented using a WebSocket or WebRTC connection to the demo's server. The page has to open that connection first, but once it's open, both page and server can exchange arbitrary messages, so that's often used to make server-driven pages.
But this means your machine is not open to receive arbitrary packets, it all has to go through that one connection.
It all doesn't really do much except contributing some bit of compute resources from your machine to their cluster while you have the tab open - and giving you a log view so you can watch it receiving requests and feel proud.
If the cluster was configured to allow any untrusted participant to run arbitrary workloads on the cluster it could then send malicious network traffic from your IP. You can’t safely assume no threat vector just because there is a sandbox involved!
My understanding was that WASM itself has no access to browser APIs, meaning it can't do network requests on its own, not even at the level permitted by the browser sandbox. You have to have supporting JavaScript to do the requests on the WASM app's behalf, which gives you the same security environment as untrusted ad code (sadly).
So it's up to the JavaScript code launching the WASM how much the WASM can do.
I think I read somewhere else here that this project doesn't expose this ability to the "pods", but instead tunnels any network requests from the emulated Linux side back to the server?
Not sure if this is correct, but it would be necessary anyway if you wanted to enable intra-cluster communication like in a real Kubernetes cluster. E.g. the code inside a pod might do something like "curl http://some-other-service.main" . In a real cluster, this would be routed to another pod where an instance of the other service is running. In this browser version, some JavaScript would have to tunnel the request through the websocket connection somehow.
You're correct, things like networking or file io that require syscalls need WASI, along with host code that implements WASI + exposes it to the guest
https://wasi.dev/
It was possible with WASM run python or ruby in your browser prior
Right but most websites serve code that was written and deployed by the owner of the website. Kubernetes is code that lets people upload and execute other code. Note this runs in a sandbox but its still on your machine.
I would have liked to be able to tell which node I am. None of them matched my os/browser/location combo
From what I understood of the description, it sounded like with two tabs open I should appear as one node with slots for two pods (using cross-tab coordination to determine how many pods to host in my "node"). I think something was explained poorly (or I understood it poorly) because I didn't see any node running more than one pod.
But still an incredibly cool idea! I'm assuming there is only one control plane node, running on the server, and the connectees are just worker nodes? Or is each tab its own worker node?
edit: I somehow missed the big "Join the cluster" button and assumed I was already part of it.
We should collab and get these two things together:
https://news.ycombinator.com/item?id=50673018
unkernel.dev is so cool. i'm curious what kind of useful things people are gonna do with it.
vpods are also funny, they used a RISC-V architecture compiled to wasm.
https://github.com/capsulerun/vpod
It can be used with boinc, spare compute for science.
Reticulum nodes. Was possible without unkernel but makes it easier I guess?
unkernel doesn't provide anything like p2p networking presented as a network interface, so how does unkernel help? I also suspect you'd have a easier time telling an LLM to "implement a reticulum node in browser, with webrtc as p2p transport, and a standalone server as a seed/coordinator/bridge to other transports".
(I also haven't fully grasped what sets reticulum apart from cjdns, yggdrasil, nebula, gnunet, … or is it more like iroh?)
Reticulum is quite different to the others but they do of course all overlap since they all do networking in various ways.
You might say RNS is more generic than the others because the others are all intended to run over certain connections (mainly on top of the internet) while RNS is intended to run over almost anything that connects two nodes (TCP, LoRa, WiFi, fiber, etc) without needing the internet (it's just a useful thing to make connections over).
The others are more intended to provide peer to peer connections or overlay networking on top of the internet, whereas Reticulum is meant to let you build networks across different underlying connections, with p2p connections and multi hop packet routing on top.
For unikernel Reticulum would probably be overcomplicating it, if you just want peer to peer connections over the internet.
Excited to see the real-world applications of this!
Can it leverage the browser's NVIDIA GPU acceleration to access shared GPU resources?
It's starting to get some webgpu support so ...yes?
https://x.com/_pi0_/status/2125372654207037513
I find it interesting there want any windows users in all the nodes when I was on the site, mostly just macos users on chrome
strange idea. I haven't dared to try it yet, Im a bit scared that opening this it will suddenly connect my browser to a bunch of unknow nodes. Does a pod running in my tab send requests to the internet through my home network, or do all requests go through their server?
the future is freaky as hell
Check out the pre-ai version, webnetes https://github.com/pojntfx/webnetes, when things like this were actually difficult to bring to the world, through sheer will and creativity :)
I’m starting to be thankful for the obvious AI-isms in web prose. It makes it easier to point out sloppy projects without having to visit their GitHub and check the commits
cool idea! next step, set up billing so that folks can earn from contributing their devices as computing clusters?
Looks like a way an agent can run loose on the internet.
You can use this one liner
inside the shell for your tab (Its a button called "Open a shell") to join a chatroom I'm hosting on the cluster nowIt turns out the shell will close after 5 minutes if nothing is typed which is mildly irritating!
shout out to your hacking https://balsa.info/
I get a 404
Yep, you will, it has to hunt around for the other nodes that are running the chat server, give it a minute (normally about 10 tries) and it will find one
Bu bu but it was supppsed to be sandboxed.
Does it support persistent volumes?
Could indexdb be used as a persistent volume?
I guess juicefs would work.
I instantly tried to open a tonne of tabs but there is a limit :D
How do you even get a geographically distributed Kubernetes? Real Kubernetes chokes when latencies exceed tens of milliseconds.
Tens of milliseconds is fine, why does this get repeated so often
I was thinking latency between control plane nodes where things start falling apart at or beyond tens of milliseconds, while these browser tabs are worker nodes.
The control plane isn't geographically distributed, just the workers. And the workloads are latency tolerant so it's all good.
Ah, thank you.
K8s is really just like a linux kernel for the cloud. You can deploy it basically in any way as long there is some kind of a network connection available and a microchip soldered on the PCB. A cluster with 1000 Raspberries? No problem. ESP32? If you like to suffer, why not? Of course not any deployment is sensible but I dont think browser k8s is for production.
The network latency matters, especially with respect to the control plane.
The OLA for response time is like 1 second last time I looked
I guess I shouldn't have been surprised to see kworker processes ... Somehow running actual containers on a Linux vm in brower tab would be even more impressive.
I'm not going to figure out what Kubernetes is just for this
It's just an administrator/orchestrator for containers. If you start a docker container without kubernetes (docker/podman run) there's nothing to "orchestrate" it, as in if it crashes the kubernetes server restarts it, moves it to less loaded nodes, ties it to its storage, etc. You can even have it manage vms and other stuff.
This is assuming you know what a container is of course but you don't need to know cgroups or syscalls in depth to understand that k8s just keeps them running and moving around how you want.
It's a giant go api server in the end, "is nginx still running 3 containers? only one? start two more."
it feels for me that docker / podman is like running a computer with a single EFI app where k8s is more a linux kernel for distributed systems. The weird part is that there isnt really an easy to use mainstream distribution existing. Okay maybe portainer will become one.
Good, spare yourself the misery, ignorance here is bliss
Love this!