Live data from Hacker News

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

devopsdirective.com

111–120 of 126 posts

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

#111
post #62

Earlier quoted context omitted.

FYI, if you're looking to deploy a hobbyist/side-project Kubernetes cluster I'd highly recommend k3s [1] - it's a lightweight certified distribution, and is ridiculously easy to set up. I haven't needed to do any maintenance besides the periodic update. It also works fine for production in my experience, I have a mildly popular website running on a 4GB VPS with it and haven't had any issues related to k3s itself. [1]…

Amen to that, after avoiding kubernetes at home for so long (run a quite a lot of clusters at work in production and while not a nightmare, it is a lot of work) - I've now moved most of my self-hosted stuff to k3s. It's been a joy to work with. We're even looking at starting to migrate most of our edge deployments to k3s as well. Really really awesome piece of work by Rancher.

What is the advantage compared to the traditional method of getting a single Linux system or VM, installing the needed packages via apt/yum, rsyncing over your code (if any) and installing systemd units for anything that needs to run all the time or scheduled?

Are Helm charts easier to use or more prevalent than distribution packages?

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

#112

Earlier quoted context omitted.

> 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…

COBOL is still in demand and highly paid.

> COBOL is still in demand and highly paid.

Being in demand means close to nothing. Once I was contacted to work on a tool that was developed in Delphi and I would hardly suggest anyone should pivot from their career to jump on that gravy train.

You should build up the skills required for your next job, not your current offers.

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

#113
post #51

Earlier quoted context omitted.

Kuburnetes is lightweight, extensible and based on open standards, which is the recipe for a long-term solution in this space. It also has first class support in all of the major cloud providers and has an established tooling ecosystem around it.

I'll agree with everything here besides 'lightweight'.

> I'll agree with everything here besides 'lightweight'.

Kubernetes is pretty lean. It does require a significant mental load to get up and running, but that's mostly due to how it forces developers to venture into the old and largely unfamiliar sysadmin territory, where you need to pay attention to more stuff other than the compiler finishing a build job.

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

#114

You could sell the MacBook and build a decent raspberrypi cluster with the money you make on it.

A big problem is local storage provisioner for kubernetes is still not GA. I want to use an SSD attached to one master, and use that as storage for the other RPIs. Doing this is still undocumented/the Wild West.

Local Persistent Volumes though has been GA since 1.14 and I think entered beta in 1.10 or 1.12, it should be usable now

I was just about to try to start using this, have you seen this article: https://vocon-it.com/2018/12/20/kubernetes-local-persistent-...

The strategy seems to be to create a storage class per app and make sure each persistent volume claim binds a distinct storage class. It sounds like a lot of heavy lifting but it's just a few YAML files... the alternative seems to be https://github.com/rancher/local-path-provisioner which uses the same strategy under the hood to fulfill PVCs as they come online using the Local Persistent Volume strategy, but does not require the storageclass arrangement I understood from the tutorial linked before.

If you want to use an SSD attached to only one special/master node, I don't think that's the wild wild west, I think that's actually closer to what you might see in a traditional network storage architecture, possible to use something like Portworx or Rook to make that work if they are supported on RPi. That's not the same as local storage provisioner though,

If you know more about it than I do I'm happy to hear more about where you got stuck, since I'll be trying to implement this strategy for myself on a non-RPi cluster with a stable set of nodes soon (stable as in, pets not cattle).

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

#115

Earlier quoted context omitted.

This is exactly right. Local storage is conceptually the persistent volume equivalent to an emptydir volume mount. If you want to have a 'storage node' in a simple way, the NFS storage provider is the way to go. You install the nfs client libs on each node, setup an NFS share and configure and run the provisioner[1]. My experience with iSCSI is to stay the heck away from it. It is not what you want. iSCSI is really m…

NFS-Provisioner and NFS-Client have been around for a while. They're about to be promoted from Incubator actually.

That is fantastic, I remember when they were new ideas without any implementation but just a few people trying some things on GitHub issues.

https://engineering.bitnami.com/articles/scaling-wordpress-i...

This article does the NFS approach justice I think, I was pleased to find it has been a working strategy for a while!

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

#116
post #62
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…

FYI, if you're looking to deploy a hobbyist/side-project Kubernetes cluster I'd highly recommend k3s [1] - it's a lightweight certified distribution, and is ridiculously easy to set up. I haven't needed to do any maintenance besides the periodic update. It also works fine for production in my experience, I have a mildly popular website running on a 4GB VPS with it and haven't had any issues related to k3s itself. [1]…

I've had great luck with moving my container stack stuff to Portainer (portainer.io), which will do containers and stacks, but is really user-friendly and low-overhead. Combine it with Ourobouros to download and auto-deploy the latest versions of containers and it's really low-touch.

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

#117
post #59

Earlier quoted context omitted.

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…

It's not helpful to say some unspecified thing is better than a concrete thing people use. What Unix tools are an alternative for Docker? I install an app, I download a VM image, and I have a dynamically sized VM with a nice simple UI to control it. VirtalBox is fine too but more heavyweight for multiple VMs at once, and Docker is where the community and premade VMs images are. Works on any platform. k8s is probably…

Packaging an app in Docker is work up front and then ongoing overhead to manage. If something I write is only going to ever run on one server, it may be easier for me just to install it on the base system, not in a container.

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

#118

Earlier quoted context omitted.

Why run windows at all?

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 work in a field related to mechanical, electrical engineering and firmware, and I not only think it’s definitely worth the effort to dual boot (I only use Windows for SolidWorks and some other instrumentation programs), I think it’s completely necessary for the more firmware-y parts of my job. Setting up an embedded firmware development environment where you have a decent level of control (so vendor-supplied IDEs are out) is about as annoying as setting up dual boot in the first place, with the obvious benefit that you get a proper UNIX-like system which in my experience increases my productivity. Also using a tiling WM is kind of a must for me when programming and cross-referencing various documents.

Edit: the part about how annoying it is to set up an embedded dev environment may not be true anymore with Windows 10’s WSL (I haven’t tried it)

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

#119

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 work in a field related to mechanical, electrical engineering and firmware, and I not only think it’s definitely worth the effort to dual boot (I only use Windows for SolidWorks and some other instrumentation programs), I think it’s completely necessary for the more firmware-y parts of my job. Setting up an embedded firmware development environment where you have a decent level of control (so vendor-supplied IDEs a…

To each his own - I work in web development but use Altium, Solidworks, Xilinx, and some esoteric embedded compilers that are Windows only for hardware side projects and some Linux infrastructure on k8s clusters for trading. All of my hardware including laptops is powerful enough that I just choose the base OS depending on the context and run VMs to provide any apps I need from other operating systems. Usually the base is Mac OS X for work to avoid deviating from the designers, Windows on personal machines because virtualized 3D still sucks on a per app basis, and Linux on headless machines at home and servers. The context switch is simply too costly for my workflow, especially since I don't always do a good job of firewalling my work from my personal machines.

WSL is great although I often prefer to SSH into a VM or run a docker container (in a VM). There are still some lingering performance problems with filesystems that they haven't solved yet though (partially solved by using VMWare for my own VMs).

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

#120
post #31

Earlier quoted context omitted.

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's just a skill thing; multibooting is more surface for "interesting" bugs and annoyances as you force interactions between systems that weren't designed to work together. Sure, you might know how to fix Windows overwriting the bootloader for the nth time, but it's still a hassle. Yes, you know how to get the UEFI settings the way you want them, but if you were single-booting the system would have don…

It starts with messed up clocks and ends up with a bricked SecureBoot.
Post reply on HN