Live data from Hacker News

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

devopsdirective.com

41–50 of 126 posts

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

#41
post #8

What sort of fun projects/experiments do people do with a super low powered k8s cluster locally? I'm kind of in this weird position where I understand the benefits and use of k8s, but I: a) Can't think of any cutesy distributed systems/microservices type thing that I could or would want to run on a low power machine locally (lack of processing power or ISP getting pissed off @ massive amount of traffic if you're e.g.…

> Don't really understand the point in investing time in it, as it feels like one of those things you learn on the job as it comes up

I don't need to spend my time developing skills for the job I've already got, I need to develop skills for the next job I'll have

> most businesses don't even have a compelling reason to switch from the old 3 tier monolith architecture.

...thus showing I can't rely on my employer to keep my skills up to date for me.

Not that there's no market for specialists in older technology - back in 1999 I heard rumours that COBOL experts were commanding huge salaries to work on millennium bug mitigation in banks. But people following that career path should be choosing it consciously, not by accident :)

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

#42
post #31

Earlier quoted context omitted.

Dual booting/VMs might not be practical or worth the effort if you're a gamer or work in one of these fields: mechanical/electrical engineering, firmware, lab or factory automation, architecture, etc.

I guess the only limiting factor in dual booting would be a lack of skill to set up dual boot. It's quite intimidating at first. I have been dual-booting for ~8 years and I have had my fair share of blunders but nowadays setting up a dual boot pc is very easy especially for the tech savvy (people who are running a k8 cluster) people. I cannot even recall if there was any time where I could restore atleast windows par…

I don't think it was setting up the dual boot that GP was saying was impractical, more having to constantly reboot to switch back & forth between OSes.

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

#43
post #8

What sort of fun projects/experiments do people do with a super low powered k8s cluster locally? I'm kind of in this weird position where I understand the benefits and use of k8s, but I: a) Can't think of any cutesy distributed systems/microservices type thing that I could or would want to run on a low power machine locally (lack of processing power or ISP getting pissed off @ massive amount of traffic if you're e.g.…

> Don't really understand the point in investing time in it, as it feels like one of those things you learn on the job as it comes up I don't need to spend my time developing skills for the job I've already got , I need to develop skills for the next job I'll have > most businesses don't even have a compelling reason to switch from the old 3 tier monolith architecture. ...thus showing I can't rely on my employer to k…

You're betting on the technology demand to move to certain direction. To me it feels like investing in stocks, but instead of betting with your money you are betting with your time and brain cycles invested. What makes you so confident that this piece of technology will flourish compared to so many others?

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

#44
post #28

Earlier quoted context omitted.

This sounds a lot like CV-driven development, rather than any actual use cases. That's not to say it's a bad idea for an individual dev, but might not say great things about our industry.

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.

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

#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 meant for more scale and attention than I like to give my home infrastructure, so although I enjoyed the experiment, I would encourage people not to run important services on something like this.

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

#46
For me there's very good reason for running home k8s cluster: dogfood factor. I run my smarthome and home surveillance (zoneminder) stuff, along with UniFi controller on k8s, and I must say that helps me a great deal with SRE part of my job. I do learn some important things before I encounter them in the work setting, such as: https://twitter.com/ivan4th/status/1236481744477532171

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

#47
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 replication ?

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

#49

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…

To tackle this issue in Kubernetes (specifically for a db), I have created persistent volume claims that are mounted across replicas in a db deployment, with the permission of multiple readers but only one writer. If we know that Postgres stores all its data in /var/x, then we can mount /var/x in all replicas as a shared volume.

In terms of the point related to taking into account in your application, as long as you have all the db replicas under one umbrella as a deployment/service, then having one endpoint for the db is fine and it is no concern of the application.

Keep in mind I am still learning Kubernetes, but this is what I have done to scale up separate back end components. Are there any objectionable/wrong practices being done?

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

#50
post #49

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…

To tackle this issue in Kubernetes (specifically for a db), I have created persistent volume claims that are mounted across replicas in a db deployment, with the permission of multiple readers but only one writer. If we know that Postgres stores all its data in /var/x, then we can mount /var/x in all replicas as a shared volume. In terms of the point related to taking into account in your application, as long as you…

This is not the right approach.

First, ReadWriteMany implementations (which depend on your cluster) might not guarantee the sort of POSIX filesystem consistency that databases expect.

Second, does Postgres in read-only replica expect to be run on a read-only, possibly-changing volume? What's the consistency model then?

The standard way of doing this is to run a single postgres instance on a single PVC/PV (that replicates across the cluster anyway), letting the cluster move the pod if it dies. In addition, you can run read-only postgres replicas for some semblance of read-only HA while the master reschedules on failure. You can also go deeper into faster failover mechanisms (without having the k8s scheduler in the hot path of that) using any of the tons of postgres HA systems.

Post reply on HN