Live data from Hacker News

Converting an old MacBook into an always-on personal Kubernetes cluster

devopsdirective.com

101–110 of 126 posts

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#102

I used to run minikube on my MBA till last year (Was running Arch). It was very underpowered to run a cluster, as I guess they'll soon find out. This was a MBA 2015, so the OP's 2012 MBA is even less powerful. The fans would start whirring, and the device was immediately unusable for anything else. I switched to using microk8s, which is slightly better, but still makes the device crawls. The MBA also only has 4GB RAM…

From my experience running a 3 node cluster (as VMs) etcd was a beast in terms of CPU and disk use.

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#103
post #74

Am I the only person that gets bugged when people use the word cluster for a single computer?

If I take a physical machine, install ESXi on it, spin up three VMs, install etcd on them, and join them together I have a cluster.

If it's instead three etcd processes in the same VM it's still a cluster.

If you evacuate two of the processes and allow a single node to maintain quorum it's still a cluster.

"I always get bugged when people use the word array to refer to an array of length 1."

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#104
post #97
post #93

Earlier quoted context omitted.

Yes, this is inevitable if you're going to run this plugged in over a significant amount of time. Should remove the battery. I found no mention of this in the article, which I think is dangerous. Unfortunately I didn't find any way to contact the author on his site (except an unused comment plugin).

Hi -- Author here. Thanks for the word of warning. I'll take a look at removing the battery to avoid any issues.

I wouldn't change your setup based on anecdata.

For instance, my MacBooks tend to be in use 5 - 10 years because they get handed down, and I essentially only run MacBooks while they're plugged in (e.g., off power less than one day a week), and have never had that happen.

I certainly see battery capacities drop after 3 years or more, and simply buy a new battery.

OWC "MacSales" batteries: https://eshop.macsales.com/shop/Apple/Laptop/Batteries

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#105
post #99

Earlier quoted context omitted.

Would you not want to stay with an Intel-based CPU? https://hackernoon.com/diy-kubernetes-cluster-with-x86-stick...

Why?

Because 99% of the time building images for Arm processors is a pain in the ass. It's not just about making sure you have all the requirements lined up, but the processors themselves are pretty slow when compared with a relatively modern Intel CPU, so builds take way longer. Compiling Tensorflow, for example, can take days on a Raspberry Pi.

Source: my company has to build software for Arm on a regular basis.

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#106
post #28

Earlier quoted context omitted.

We have adopted Kubernetes at our startup. It's solved a couple of problems but created a whole lot more. We aren't at the stage that we need the scaling yet.

What problems did it create ? We adopted Kubernetes at our startup, it solved most ci/cd and devops issues for the team. We didn't need the scaling either, we have at max maybe 2 containers of a service but we know we are ready.

Out of memory issues because we use multiple small machines instead of one big one. There are othrs but we haven't worked out what they are yet.

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#107
post #81
post #75

Earlier quoted context omitted.

Macbook appears to be pretty intelligent about it's battery. My 2016 is still over 90% healthy and regularly gets over 5 hours on a single charge (load dependent of course). It's pretty much on 24/7.

The issue is that the battery never gets a chance to discharge if you’re using it as a server. Unless you’re unplugging it and monitoring the battery life and plugging it back in every day.

Hmm, most of my work laptops never get used unplugged and I've never had issues.

It might be fun to implement some sort of service that checks battery life once per day and turns off a smart plug (which the Macbook power adapter is plugged into) and lets the Macbook drain once per day before turning it back on, though.

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#108

There are things I don't understand with Kubernetes and the "spin up containers as needed". How do you spin up different databases ? It won't sync, unless your code takes that into account... Say, I have a simple WP site running with a web, a php and a db container... What's the schema to give 2 or 3 more database container and still have visitors see the same content ? (and the databases being consistent) Set up rep…

For complex services (maybe as simply defined as need low latency durable high-write-rate storage) - I'm not even sure if you should run it on a k8s pod. K8s offers some "services", notably storage - that afaik don't typically run "on" k8s, but "as part of" k8s.

I think databases (for production use) are better off managed as services? So typically on physical hw next to the hw that runs k8s?

The alternative (as mentioned here) is to guarantee local storage on same hw next to the pod running the DBs - and you'd typically want to dedicate cpu, io and ram to the db - probably dedicate physical hw to the db pod(s).

Maybe k8s can take care of failing over to a follower - but I don't think that's likely to work without a "plug in" in k8s for your db of choice?

Maybe someone running redshift, spanner or azul sql service have some insight?

Ed: for development and testing, that's another matter. But even then I think I'd prefer "provision a new db/schema on my beefy db service" to spinning up a pod that just happens to run a db daemon.

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#109
post #9

Anyone have a theory why they're running OS X on it?

> I happen to have a 2012 MacBook Air sitting around unused now that it is no longer my daily driver. It already had MacOS installed and there was no strong reason not to use it.

Does it run the latest os x OK?

Re: Converting an old MacBook into an always-on personal Kubernetes cluster

#110
post #59
post #45

For what it's worth, I built one like this on an old Linux laptop. I then moved my home lighting controller onto it as a test. Some months later my house lights stopped working, and I had to spend a few hours applying snippets semi-randomly from Stack Overflow. It could be the problem was due to expired Kubernetes certificates, or it could be something else. Either way, my conclusion was that Kubernetes is really mea…

I have a strong feeling that the added complexity of Kubernetes does not give most use cases a net payoff for hobbyists. A lot of the quirks and monkey wrenching with both Docker and Kubernetes seems to be like problems that in many cases were solved in traditional _NIX systems decades ago. I'm sure there are benefits of throwing some of that architecture out for some scenarios but people shouldn't treat it as a new…

> I have a strong feeling that the added complexity of Kubernetes does not give most use cases a net payoff for hobbyists.

Kubernetes is a tool to setup and manage computer clusters comprised of COTS hardware, and also manage how processes are deployed and ran on it. That's not exactly your typical hobbyist's scale.

Post reply on HN