Firstly, I would not place myself on either side of the isle in the Windows vs Mac debate when it comes to Operating Systems (OS). I see them both as nice but faulty systems outside of graphic and web development. I prefer Linux, specifically Ubuntu because of the ease of maintenance, OS customization, and the large variety of supported distribution packages. If Alpine Linux provided more packages I could install using apk, Alpine’s package manager, it would rank higher than Ubuntu for me.
I recently purchased a refurbished Dell Latitude 7300 to use as my local testing environment. I build docker images, intentionally break my personal websites (not this one yet), and deploy applications with Docker Compose and Kubernetes. My previous laptop for this was an HP Spectre, and the one before that was a MacBook Pro. I generally prefer to buy refurbished and have no preference of Windows or Mac.
I have been looking into using, stress testing, comparing, and breaking different Kubernetes distributions like k0s, k3s, minikube and the like. I like smaller distributions and started out using k3s but I was quickly annoyed with how rigid the control plane and cluster infrastructure itself in general were. So I moved to using k0s, this distribution is technically more flexible especially with additional worker nodes added to the controller.
My first attempt at deploying k3s on WSL was a failure because I needed to use WSL 2. Once that was up and running I quickly learned that although WSL integrated nicely with my local operating system that there were a few basic Linux packages needed to build and deploy a few applications I was working on. The first solution was to use, in my opinion, a more flexible Kubernetes distribution so I uninstalled k3s in favor of k0s. Unfortunately I rant into the same issue of missing packages, and strange “control plane” issues that I would bet had to do with the underlying host system, Windows.
Annoyed with these roadblocks, I decided to ditch WSL all together so I went through the process of uninstalling every “WSL” related application I could find on my machine. Don’t do that. There are a few virtual applications required for Docker Desktop for Windows and similar packages. Needless to day, I spend quite some time debugging and installing packages to fix my mistake. I was close to completely wiping the laptop and starting from scratch.
To save myself from the chaos, I decided to switch to using VirtualBox. I prefer it over something like VMware because there are no hidden pay walls for features. As mentioned before, Ubuntu was my go to OS of choice. It took less than half the time needed to setup the Virtual Machine (VM) I am currently using for creating and testing my personal projects. VirtualBox has the vboxmanage
tool that provides a lot of nice headless actions to apply to a VM. It is also a lot easier to setup an SSH port to the local machine and seamlessly work in a “Linux” environment in PowerShell.
While I can’t completely blame WSL for the pitfalls of my setup failures, I can certainly pretend that it was solely at fault and that I set everything up perfectly.
I have not deployed any Kubernetes clusters in my VM yet, but I have been working with Docker Compose and testing out Lagoon locally again. Everything has worked out quite well and I feel that when I do install k3s (again) I will have a better time overall.
Lessons learned:
- Do not blindly uninstall applications from Windows when WSL and Docker Desktop are installed
- WSL 2 is not your friend even if it makes you feel like a real Linux user
- Kubernetes distributions have a few rigid components of its architecture that will clash with Windows at some point
- VMs don’t have to be bulky and can be as flexible as we build them
Up next, I will try using Alpine Linux to create, test, and publish tools I use for my personal projects. I hope to have a slim, lightweight environment that can be replicated and spun up quick and easy. Maybe if I get enough tools developed, I can build out my own little server image with HashiCorp Packer.
Not related, but I have learned about Tailscale and it has changed my ideas of remote servers from centering providers (lAWS, GCP, etc.) to focusing on “remote” intranet-like systems.
What have you been trying out? What have you broken? What did you learned?