Live data from Hacker News

I ported Kubernetes to the browser

ngrok.com

61–70 of 110 posts

Re: I ported Kubernetes to the browser

#61
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

Why is the title false?

the author paid for a robot to write the software while they watched.

it's a bad faith dig at ai-driven development, not the part of the comment that was supposed to be taken seriously, sorry.

Re: I ported Kubernetes to the browser

#62
post #38

This is awesome. Wish I had the idea first. I see this as a fun learning and experimental tool. For a while I have wanted to make a web page where you can do service load balancing and queuing simulations so this would be a great basis for it.

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

Re: I ported Kubernetes to the browser

#63
post #61

Earlier quoted context omitted.

Why is the title false?

the author paid for a robot to write the software while they watched. it's a bad faith dig at ai-driven development, not the part of the comment that was supposed to be taken seriously, sorry.

The author clearly explains his process in detail, explaining the pitfalls. Not sure why you’d make a dig like this. There are some useful insights in the article

Re: I ported Kubernetes to the browser

#64

Earlier quoted context omitted.

I don't think this analogy holds. Version control and diffing are some core capabilities of git. Sam lists core capabilities of k8s that his port can handle: pod lifecycles, container garbage collection, IP allocation, etc. My understanding is that the interesting part of k8s is how it orchestrates containers, which this port can do a lot of. Your comments imply that a core component of k8s is actually running contai…

To me the interesting part is the use case. To call it a port that doesn’t actually work? Idk seems like a baseline requirement. It’s like saying you ported YouTube to a calculator but it doesn’t play videos because the most interesting part is the search algorithm, and it’s for educational purposes not functionality. That just isn’t a port.

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

Re: I ported Kubernetes to the browser

#65
post #45
post #42

Earlier quoted context omitted.

I definitely don't think that ordinary things would be too CPU-hungry on the main thread, but given how awkward it _can_ be to use the worker APIs, it would be a lovely abstraction to be able to treat workers as pods. I would love to run a CPU-hungry or WASM service on a worker as a pod and communicate with it over your take on CNI! Similarly, when you move on to doing Volumes support, the browser's OPFS APIs can be…

I’m 100% confident it would be possible to do a worker-per-pod runtime. If you’re serious about trying to make it then slide into my DMs, would love to talk about it. I also think a CRI that supports WASM would be fairly easy. Volumes are one of those things that I’m quite sure won’t be that difficult to implement but I don’t have a need for them in the near future, so likely won’t support them for a good while.

DM-ed :)

Re: I ported Kubernetes to the browser

#66
post #55
post #39

Earlier quoted context omitted.

Could you explain your mental model of the situation a bit more? Let's take something like GML 5.2 that is open source - anyone can run it on NVIDIA or AMD chips. People are currently making money by running GLM 5.2 Nvidia and AMD chips and selling inference on aggregators like openRouter. So the cost to serve is like cost of Chip or financing for Chip + power and rackspace somewhere. We basically know that each year…

> Could you explain your mental model of the situation a bit more? I'm talking specifically about US-based AI companies / hardware companies and their circular investments and their customer-facing pricing. > We basically know that each year you will be able to server exponentially more inference per $ on Nvidia and AMD hardware as it gets to newer generations, so why would you expect the cost of inference on open mo…

Hmm but isn't your point moot if the GLM 5.2 type models are good enough to do these large scale port to Rust projects? Like maybe Anthropic goes bust but doesn't really matter for this case.

I feel like your conflating some general skepticism around the trillion dollar valuation of the US majors and their business model with the topic at hand - large scale C to Rust conversions and similar.

Re: I ported Kubernetes to the browser

#68
post #66
post #55

Earlier quoted context omitted.

> Could you explain your mental model of the situation a bit more? I'm talking specifically about US-based AI companies / hardware companies and their circular investments and their customer-facing pricing. > We basically know that each year you will be able to server exponentially more inference per $ on Nvidia and AMD hardware as it gets to newer generations, so why would you expect the cost of inference on open mo…

Hmm but isn't your point moot if the GLM 5.2 type models are good enough to do these large scale port to Rust projects? Like maybe Anthropic goes bust but doesn't really matter for this case. I feel like your conflating some general skepticism around the trillion dollar valuation of the US majors and their business model with the topic at hand - large scale C to Rust conversions and similar.

It will be very difficult to get those used in production in any US enterprise in the Fortune 500.

The topic at hand wasn't rust conversions, it was token cost.

Effectively token cost for most in the US is whatever the companies and US Gov say it is... Until it pops because they have no real moat.

Re: I ported Kubernetes to the browser

#70

Earlier quoted context omitted.

To me the interesting part is the use case. To call it a port that doesn’t actually work? Idk seems like a baseline requirement. It’s like saying you ported YouTube to a calculator but it doesn’t play videos because the most interesting part is the search algorithm, and it’s for educational purposes not functionality. That just isn’t a port.

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 like a PlayStation emulator... the game itself does not need to be ported - just as if you really made a k8s port you would not really need to reinvent Linux in JS, only be able to run it

A PSX emulator can be said to have been ported (e.g. Tomb Raider has been ported to the browser even though it relies on underlying C++) because it ultimately runs fully 1:1 in a web page. It's a port as far as I'm concerned.

But a k8s port that doesn't do what k8s does isn't a port IMO

Post reply on HN