alex plant dot org

falling up since 1991

Zsh Random Password Generator

Time for another zsh one-liner… if you want to generate a 20-character random alphanumeric password this will do it: LC_CTYPE=C LC_ALL=C tr -dc "a-zA-Z0-9-_\$\?" < /dev/urandom | head -c 20; echo …no LastPass required!

Checking a Kubernetes Terraform Plan To Make Sure That Docker Images Exist

A month or two ago I noticed that an application I was working on broke after an automatic terraform apply that had been ran as part of a CI job. kubectl quickly revealed an ImagePullBackOff as the culprit. It turned out that the wrong image tag had been specified in one of the .tf files and the kubelet was trying to pull a non-existent image. While it would be nice if the Kubernetes Terraform provider was smart enough to check for this ahead of time it makes sense as to why it doesn’t… your machine isn’t on the same network as the kubelet, isn’t using the same credentials for the Docker pull, and might not be running the same OS or container engine.

Provisioning Confluent Cloud Kafka Using Terraform

You’re probably here via a search engine in a feverish quest for a solution so I’ll just get straight to it: Here’s some HCL for provisioning a Confluent Cloud Kafka cluster along with accompanying resources. variable "confluentcloud_username" {} variable "confluentcloud_password" {} terraform { required_providers { confluentcloud = { source = "Mongey/confluentcloud" version = "0.0.10" } kafka = { source = "Mongey/kafka" version = "0.3.0" } } } provider "confluentcloud" { username = var.

Find All Images Running in your Kubernetes Cluster

Here’s a quick, handy one-liner that I whipped up the other day… if you want to find all the images presently running in your Kubernetes cluster this will give you a newline-delimited list: kubectl get pods -o jsonpath="{.items[*].spec.containers[*].image}" | tr " " "\n" | sort -u This is probably completely obvious to those with better bash-fu and ability to write Kubernetes YAML from memory than I, but hey, it took me a few minutes to come up with and I’d like to save my future self a history grep and help those who were in the same boat as I was when I sought how to do this initially.

OpenWRT Settings for Cox

For months my OpenWRT-equipped router has been sitting in my closet collecting dust because I couldn’t figure out how to get it to pull an IP from Cox’s DHCP. This then prompted me to bang out a few paragraphs regarding my thoughts on pfSense and OpenWRT. In the very probable case that you aren’t interested in my home networking journey and are more interested in getting your router working here’s the quick and dirty (looking at you, recipe web sites):

Seven Deadly DNS Sins

The month of March is approaching rapidly, and you all know what that means: DNS Awareness Month is about to be upon us! But not really. Several links that I’ve seen in the past few weeks on HN have surfaced bad professional memories I have regarding DNS. When employed properly DNS is a force for good - it enhances user and operator experience and saves us from having to memorize IP addresses.

Under Construction

The site has been reborn into its third iteration! Like a glorious digital Phoenix it has risen from its ashes! More to follow soon.