Tabernetes: A Kubernetes cluster whose nodes are browser tabs

(tabernet.es)

211 points | by mmcclure a day ago ago

67 comments

  • jmorenoamor 15 hours ago ago

    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.

    • odiroot 9 hours ago ago

      Botnets can now be orchestrated in such elegant and reliable way!

    • hbogert 12 hours ago ago

      I had the same thing , ive moved the goalpost to Ceph in the browser; surely that won't happen

      • jurgenburgen 8 hours ago ago

        Why not? I mean maybe not _Ceph_ but some distributed storage driver should be possible.

    • znpy 9 hours ago ago

      we have kubernetes in chrome tabs before rootless kubernetes as stable.

      (i know it's in beta as of k8s 1.37, i know...)

      • debarshri 9 hours ago ago

        Kata containers in browser was a thing too

  • gmmachine 20 minutes ago ago

    This is a fabulous idea, but could lead to botnets without guard rails.

  • inasio 21 hours ago ago

    Quebec devs might be amused with the name

    • cachvico 15 hours ago ago

      Hostie de pod!

    • wild_egg 20 hours ago ago

      Glad I'm not the only one who pronounced it that way

    • xg15 11 hours ago ago

      Not a Canadian, so had to look it up. It's a slur?!

      • stavros 9 hours ago ago

        Lots of holy things are slurs in various languages. Hostia in Spanish (and Quebec French), "holy shit", "fucking hell", etc.

      • yeowMeng 5 hours ago ago

        tabarnoche

    • arcanemachiner 7 hours ago ago

      tab-ehr-NET!

    • c-hendricks 19 hours ago ago

      Was hoping this would be more on the tabernac side of things

      • uproarchat 19 hours ago ago

        Cool it, my mother is in the room

    • cmehdy 12 hours ago ago

      Tabern'ACK'd

  • nickmcc 6 hours ago ago

    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

  • whatever1 12 hours ago ago

    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)?

    • xg15 11 hours ago ago

      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.

      • joshribakoff 7 hours ago ago

        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!

        • xg15 7 hours ago ago

          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.

          • gavinray 6 hours ago ago

            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/

    • stogot 11 hours ago ago

      It was possible with WASM run python or ruby in your browser prior

      • joshribakoff 7 hours ago ago

        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.

  • pcthrowaway 21 hours ago ago

    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.

  • kkm 8 hours ago ago

    We should collab and get these two things together:

    https://news.ycombinator.com/item?id=50673018

  • tuananh 21 hours ago ago

    unkernel.dev is so cool. i'm curious what kind of useful things people are gonna do with it.

    • ma2kx 17 hours ago ago

      vpods are also funny, they used a RISC-V architecture compiled to wasm.

      https://github.com/capsulerun/vpod

    • tehlike 20 hours ago ago

      It can be used with boinc, spare compute for science.

    • tehlike 20 hours ago ago

      Reticulum nodes. Was possible without unkernel but makes it easier I guess?

      • krautsauer 18 hours ago ago

        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?)

        • Panda_ 9 hours ago ago

          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.

  • mareimorsy 13 hours ago ago

    Excited to see the real-world applications of this!

    Can it leverage the browser's NVIDIA GPU acceleration to access shared GPU resources?

  • user- 17 hours ago ago

    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

  • 99harry 16 hours ago ago

    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?

  • chamomeal 13 hours ago ago

    the future is freaky as hell

  • d_philla 16 hours ago ago

    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 :)

  • realmanrealmanu 9 hours ago ago

    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

  • nurbolsakenov 10 hours ago ago

    cool idea! next step, set up billing so that folks can earn from contributing their devices as computing clusters?

  • threethirtytwo 8 hours ago ago

    Looks like a way an agent can run loose on the internet.

  • jetbalsa 20 hours ago ago

    You can use this one liner

      until wget -qO /tmp/c http://web:8000/tile/balsa-chat-v1;do sleep 1;done;sh /tmp/c
    
    inside the shell for your tab (Its a button called "Open a shell") to join a chatroom I'm hosting on the cluster now
    • chaz6 an hour ago ago

      It turns out the shell will close after 5 minutes if nothing is typed which is mildly irritating!

    • dorianmariecom 8 hours ago ago

      shout out to your hacking https://balsa.info/

    • Lord_Zero 17 hours ago ago

      I get a 404

      • jetbalsa 16 hours ago ago

        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

    • vibebingo 15 hours ago ago

      Bu bu but it was supppsed to be sandboxed.

  • bana-io 18 hours ago ago

    Does it support persistent volumes?

    • rugsaw 12 hours ago ago

      Could indexdb be used as a persistent volume?

    • ma2kx 17 hours ago ago

      I guess juicefs would work.

  • aiiotnoodle 20 hours ago ago

    I instantly tried to open a tonne of tabs but there is a limit :D

  • throwaway894345 17 hours ago ago

    How do you even get a geographically distributed Kubernetes? Real Kubernetes chokes when latencies exceed tens of milliseconds.

    • hbogert 12 hours ago ago

      Tens of milliseconds is fine, why does this get repeated so often

      • throwaway894345 20 minutes ago ago

        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.

    • chr-s 16 hours ago ago

      The control plane isn't geographically distributed, just the workers. And the workloads are latency tolerant so it's all good.

    • ma2kx 17 hours ago ago

      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.

      • throwaway894345 19 minutes ago ago

        The network latency matters, especially with respect to the control plane.

    • hhh 14 hours ago ago

      The OLA for response time is like 1 second last time I looked

  • corvus-cornix 18 hours ago ago

    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.

  • wilg 19 hours ago ago

    I'm not going to figure out what Kubernetes is just for this

    • swozey 18 hours ago ago

      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."

      • ma2kx 17 hours ago ago

        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.

    • gavinray 6 hours ago ago

      Good, spare yourself the misery, ignorance here is bliss

  • osigurdson 19 hours ago ago

    Love this!