Live data from Hacker News

I ported Kubernetes to the browser

ngrok.com

71–80 of 110 posts

Re: I ported Kubernetes to the browser

#71
post #58

giving yourself (or your llm) infinite future work in maintaining all that duplicated kubernetes source code is a bad idea, surely? the author notes they could have compiled the kubernetes to wasm, but doesn't due to... bundle size? i haven't tried, but surely it wouldn't work because all os-level functionality would cause panics. also the title is false

I've also wondered whether implementing OS calls would have been smarter. Maybe there's already a library that does 90% for you.

But then, I get the idea of the project. If you wanted real kubernetes, it's easy to install on any OS or online in a VM.

There has to be some cutoff of features where "it runs in the browser" makes sense. I think the project has made a good call here.

Re: I ported Kubernetes to the browser

#73

1. It's not really running containers in the browser, right? It seems every service would need a custom connector - and more importantly... 2. ...would need a renderer, right? Otherwise what does it mean to be "ported to the browser"? To use an analogy - if somebody ported DOOM to the browser, that means I can now play it in the browser. But I can't really run those databases that it shows in the browser tab, can I?…

> Webernetes is intended to be used to make interactive Kubernetes content;

Re: I ported Kubernetes to the browser

#74

Earlier quoted context omitted.

I get your point. I will disagree that it "doesn't work". It does! You just can't use it for real production workloads since it runs in your browser. If you ported kubernetes to your toaster would it be a port? I think so, but you probably couldn't deploy prod on it. That's just a fun semantics conversation though. Is a taco a sandwich? :-)

Considering what kubernetes actually is - there's a fantastic use case if you really did port it to the browser. So when someone says they did it, I kinda expect that they literally ported that containerization logic to JavaScript. That would mean I could run an image of an OS like Linux in browser JavaScript. It's a wild thing, but that's what porting literally means! And what I expected with that title. Think of li…

But Kubernetes isn't postgres or ruby or containers. It's the orchestration service. Your comparison doesn't make sense.

Re: I ported Kubernetes to the browser

#75

Earlier quoted context omitted.

I get your point. I will disagree that it "doesn't work". It does! You just can't use it for real production workloads since it runs in your browser. If you ported kubernetes to your toaster would it be a port? I think so, but you probably couldn't deploy prod on it. That's just a fun semantics conversation though. Is a taco a sandwich? :-)

Considering what kubernetes actually is - there's a fantastic use case if you really did port it to the browser. So when someone says they did it, I kinda expect that they literally ported that containerization logic to JavaScript. That would mean I could run an image of an OS like Linux in browser JavaScript. It's a wild thing, but that's what porting literally means! And what I expected with that title. Think of li…

K8s doesn't run containers, container runtime environments do.

K8s sits on top of those and orchestrates them.

Re: I ported Kubernetes to the browser

#77

As someone who loves teaching and building this can be very useful For example i built this https://kubernetes-made-simple.vercel.app/ Now i can add this

The reconciliation simulator goes crazy when I change the expected pods on iphone.

Its a cool site btw

Re: I ported Kubernetes to the browser

#79
post #58

giving yourself (or your llm) infinite future work in maintaining all that duplicated kubernetes source code is a bad idea, surely? the author notes they could have compiled the kubernetes to wasm, but doesn't due to... bundle size? i haven't tried, but surely it wouldn't work because all os-level functionality would cause panics. also the title is false

I've also wondered whether implementing OS calls would have been smarter. Maybe there's already a library that does 90% for you. But then, I get the idea of the project. If you wanted real kubernetes, it's easy to install on any OS or online in a VM. There has to be some cutoff of features where "it runs in the browser" makes sense. I think the project has made a good call here.

Thank you!

To address the earlier comment: I didn’t go down the “implement the OS-level stuff required to get k8s to compile to wasm” path due to bundle size, honestly and truly. My testing indicated it could be over 10Mb, and I didn’t want that if I could avoid it. Turns out, I could avoid it.

Whether it’s a bad idea remains to be seen. It could be! The project will never have full parity with k8s, and as k8s moves forward I probably won’t keep up. But I think the core of k8s is stable enough that that’s okay, and I can make great content about the bits that don’t change.

Re: I ported Kubernetes to the browser

#80
post #38

Earlier quoted context omitted.

I have some potentially bad news for you: https://samwho.dev/load-balancing https://encore.dev/blog/queueing

Doesn't have to be bad news! An abundance of explainers is only good for the world. Different explanations work for different people. Someday somebody will say "I read all the articles people recommended, and I don't know why but it only clicked for me when I read mcapodici's!" I bet you just meant to share prior art and not be discouraging, Sam. But just saying :-)

Completely agree! Wasn’t trying to discourage, hope it doesn’t have that effect.
Post reply on HN