Skip to content

2024

Use BATS to Automate Kubernetes Testing

BATS Testing
You can check out the bats-core project on GitHub.

PAGE UNDER CONSTRUCTION

Have you wanted to test things that you know how to run in your bash scripts or terminal, but aren't quite sure how to make it happen? Take a look at the Bash Automated Testing System (BATS) and make that dream a reality!

By writing automated and repeatable tests with BATS, you can create a validation framework that works equally well in your terminal and CI/CD pipelines, giving you the opportunity to pass "smoke tests" before flagging your k8s resources as production-ready.

In this post we will go over a few examples of how to test basic API connectivity, as well as some more complex tests that you may want to perform.

Build Your Own GitLab Runners on EKS

PAGE UNDER CONSTRUCTION

As more and more DevOps teams adopt GitLab for internal development, and furthermore use GitLab CI/CD pipelines, finding ways to manage costs while still delivering highly available, scalable pipelines is crucial.

In this post I will provide an overview of GitLab runners and their role in CI/CD pipelines, as well as how you can configure your own self-managed runners using the Kubernetes executor running in your own EKS cluster.

Overview

At a high level, a GitLab runner is an agent that runs CI jobs in your pipeline. This can be in the form of agents running on Linux, Windows, or Mac hosts, as well as Docker or Kubernetes.

Karpenter and Why You Should Ditch Cluster Autoscaler

PAGE UNDER CONSTRUCTION

If you have used Amazon Elastic Kubernetes Service (EKS) you may have experienced that node groups' autoscaling leaves a bit to be desired. It can be slow, clunky to configure, and making use of mixed instance types can be difficult. My biggest complaint? Nodes launch SLOW!

Enter Karpenter. Karpenter is a node provisioner - which now uses the NodePool terminology, similar to GKE and others - that utilizes the EC2 Fleet API to schedule nodes directly to the cluster, without having to be in a managed node group!

Why would you want to do this? How about nodes that launch and reach Ready state in k8s in 10 seconds!

Read on to see how you can scale faster, more reliably, with greater flexibility, and save money by using Karpenter.

Build a MkDocs Site with Terraform and S3

PAGE UNDER CONSTRUCTION

Find the latest code for this project on my GitHub

Chances are you have seen a website or documentation that make use of MkDocs, and especially Material for MkDocs. In fact, this blog site runs using Material for MkDocs and I have to say it is a delight compared to typical blog or WordPress platforms!

This becomes really powerful - and cost-effective - combined with the ability to host a static website using Amazon S3.

In this post I will show you how to create the AWS resources necessary for hosting your website using Terraform, as well as how to set up a basic MkDocs site.

Unit Test IaC with Terraform Tests

Testing Terraform

PAGE UNDER CONSTRUCTION

A challenge of being a DevOps engineer is that some of the typical dev parts don't always fit nicely. Unit testing is one example, where IaC is often hard to test in isolation and without some sort of actual deployment in a "test" or "sandbox" environment to validate against.

The lines between unit and integration testing become blurred for many DevOps or Platform engineers. Thankfully, HashiCorp has seen this gap and has introduced Terraform Tests to help bridge this gap!

In this post I will go over some basic unit testing that can be done for validating your IaC using terraform test to improve your code quality and provide additional peace of mind when making changes to your IaC!

Host Your Own Notes with Joplin and DigitalOcean Spaces

Canceling Expensive Note Subscriptions
Generated by DALL-E, which has issues with spelling

Ditch the expensive note apps for a sweet open source alternative, managing your own data and synchronization with S3-compatible storage!

I've tried a lot of them (Evernote, OneNote, Notion, Quip, Obsidian, Standardnotes, all the app store riffraff). Someone posted on LinkedIn recently about Evernote going up to $149.99 a year.

Here's the deal, a good notes app really needs to do a few things well (subjectively):

Plex Media Server on Kubernetes with Hardware Transcoding!

Frank Get Weird With It
If Plex on Kubernetes is wrong, I don't wanna be right!

If you're a home media enthusiast, chances are you have at least heard of Plex Media Server. The idea of ditching all those old DVDs that you don't want to get rid of is tough, but if you can keep them on a Network Attached Storage (NAS) device, stream them - locally and remotely - and deepen your expertise with Kubernetes? Sounds like a winning decision!

AWS SSO with Terraform and Secrets Manager

You can find the latest code for this project on GitHub: https://github.com/shadetree-dev/terraform-aws-sso-permission-sets-example

We'll go through a few stages in this journey to get there:

  1. Bitch about SSO a bit and why it's such a burden to deal with
  2. Delegate an administrator for IAM Identity Center (SSO)
  3. Set up some AWS Secrets Manager secrets to pull dynamically from (avoid hard-coding)
  4. Write some Terraform and apply it!