pi dramble

Running Drupal in Kubernetes with Docker in production

Update: Since posting this, there have been some interesting new developments in this area, for example:

Since 2014, I've been working on various projects which containerized Drupal in a production environment. There have always been a few growing pains—there will for some time, as there are so few places actually using Docker or containers in a production environment (at least in a 'cloud native' way, without tons of volume mounts), though this is changing. It was slow at first, but it's becoming much more rapid.

Monitoring Kubernetes cluster utilization and capacity (the poor man's way)

If you're running Kubernetes clusters at scale, it pays to have good monitoring in place. Typical tools I use in production like Prometheus and Alertmanager are extremely useful in monitoring critical metrics, like "is my cluster almost out of CPU or Memory?"

But I also have a number of smaller clusters—some of them like my Raspberry Pi Dramble have very little in the way of resources available for hosting monitoring internally. But I still want to be able to say, at any given moment, "how much CPU or RAM is available inside the cluster? Can I fit more Pods in the cluster?"

So without further ado, I'm now using the following script, which is slightly adapted from a script found in the Kubernetes issue Need simple kubectl command to see cluster resource usage:

Usage is pretty easy, just make sure you have your kubeconfig configured so kubectl commands are working on the cluster, then run:

Kubernetes' Complexity

Over the past month, I started rebuilding the Raspberry Pi Dramble project using Kubernetes instead of installing and configuring the LEMP stack directly on nodes via Ansible (track GitHub issues here). Along the way, I've hit tons of minor issues with the installation, and I wanted to document some of the things I think turn people away from Kubernetes early in the learning process. Kubernetes is definitely not the answer to all application hosting problems, but it is a great fit for some, and it would be a shame for someone who could really benefit from Kubernetes to be stumped and turn to some other solution that costs more in time, money, or maintenance!

Raspberry Pi Dramble cluster running Kubernetes with Green LEDs

Raspberry Pi 3 B+ Review and Performance Comparison

Three generations of Raspberry Pi - model 2 B, model 3 B, model 3 B+
Three generations of multi-core Pi: model 2 B, model 3 B, model 3 B+

Whether it's been a 6-node Raspberry Pi cluster running Drupal 8, or a distributed home temperature monitoring application, I use Raspberry Pis for a wide variety of fun projects. The Raspberry Pi model 3 B+ is the latest iteration of the 'top of the line' Pi, with all the bells and whistles, and it still comes in at just $35. This year's iteration improves the CPU frequency, wired LAN performance, and WiFi performance, among other smaller changes, and I ordered one and have taken it for a spin.

What follows are my benchmarks and impressions after a couple weeks poking and prodding the new model 3 B+.

Subscribe to RSS - pi dramble