Fast Kubernetes Testing on macOS with k3s and Colima
Posted on December 2, 2025
(Last modified on January 9, 2026)
| 1 minutes
| 197 words
| Kris Cotten
In order to get a quick Kubernetes cluster for local development on macOS we can turn to
Colima
. Long story short, we can leverage Colima by itself to create the entire setup with networking to skip a lot of fuss.
To get started:
If you don’t already have the Kubernetes command line interface,
kubectl
, you should also install that now in order to interact with your cluster.
[Read More]
Simple Ec2 Instance
Posted on January 7, 2023
| 6 minutes
| 1076 words
| Kris Cotten
Creating infrastructure with code is an extremely powerful tool that can abstract away the need for on-premises hardware. Instead of attempting to hand provision things in private cloud consoles such as AWS, GCP, or Azure we can instead rely on tools such as Terraform and Pulumi to help automate this and in both cases help to keep track of the state of the infrastructure. Sometimes, if you just need something quickly, one could also use Bash and the aws-cli to provision the same. Be aware, however, that you would need to write an accompanying uninstall script and/or destroy the resources manually.
[Read More]
Connect from WSL2 to a Windows Service
Posted on October 13, 2022
| 1 minutes
| 143 words
| Kris Cotten
Recently, while doing some experimentation with MongoDB I noticed that my Spring app would no longer connect to mongo with the old WSL1 configuration. After some digging I was able to reconnect my app running in WSL2 to the Mongo service running on the Windows side. The following steps should get packets flowing:
-
Allow packets through the firewall by firing up a Powershell console and issuing:
New-NetFirewallRule -DisplayName "MongoDB from WSL2" -InterfaceAlias "vEthernet (WSL)" -Direction Inbound -Protocol TCP -LocalPort 27017 -Action Allow
-
Reconfigure Mongo to listen for requests on all interfaces, as this is just for local development, by editing the mongod.cfg line:
[Read More]
Add An Existing Repo to Github via CLI
Posted on October 3, 2022
| 1 minutes
| 151 words
| Kris Cotten
If you’d like to push an already existing git repository to github then you can easily create the repository from the cli and begin the foundations of interacting with remote repos programmatically. First, you need a personal access token and if you do not yet have one then perform the following:
- Access your github account settings
- Developer Settings
- Personal access tokens
Be sure to save/download the token, as you will be unable to access it in the future. Once the token has been generated use it in the following curl command to create the desired repo replacing <name> with the desired repo name:
[Read More]
Dynamic JSON Parsing
Posted on October 10, 2021
| 2 minutes
| 262 words
| Kris Cotten
Almost always when writing a REST endpoint you will know beforehand the format of the data you will receive and you can write your downstream client accordingly. Barring documentation you can parse a curl response and adjust accordingly, but what if the tables were turned and you needed to dynamically parse unknown JSON?
In Python, with a dynamic type system, this is relatively straight forward. Let’s parse and print the results such as in
this
example.
[Read More]
Simple IPC with gRPC
Posted on September 13, 2021
| 2 minutes
| 224 words
| Kris Cotten
Once an application has been broken up into microservices there is a need for these processes to communicate with one another. Enter
gRPC
a consistent, lightweight remote procedure call framework. Loosely speaking, the protocol allows a client and server to communicate via HTTP2 through an interface called a protocol buffer. Refer to
this
page for a visual breakdown of the call flow. Without getting bogged down in the details, suffice to say grpc’s strict protocol definitions are advantageous to developers by simplifying the hassle around Inter-process Communication (IPC).
[Read More]
Go Rest Endpoint
Posted on August 16, 2021
| 1 minutes
| 121 words
| Kris Cotten
An example of a simple REST endpoint in go is:
Choosing
gorilla/mux
yields a cleaner, simpler interface that works well with the standard library. From main() instantiate the router, for handling the HTTP routes, initialize it, and finally listen and serve.
The router instantiated is the mux.Router that we will use to register routes to be served. Since this is just an example nothing more sophisticated than serving a GET endpoint at /info is happening. From there initialize the router by registering the routes and fire up the HTTP server using the standard library’s http.Server().
[Read More]
Dockerize Your Go Web App
Posted on August 10, 2021
| 3 minutes
| 432 words
| Kris Cotten
After browsing around the internet I couldn’t find any guides for exactly what I wanted to do with a prototype I was writing and so decided to share my discoveries. After writing your web app in
Go
to get it ready for deployment in docker (and later to the cloud) create a new file named dockerfile in the main directory ~/go/src/<my-app>.
Check the version of go you are using quickly with $ go version and then add the following to your new dockerfile:
[Read More]
Replacing a disk on a headless Ubuntu server
Posted on November 1, 2020
| 3 minutes
| 456 words
| Kris Cotten
Recently I picked up a new 4 TB SSD on sale at the Amazon Prime day sale to replace an aging RAID5 array in my media server. Over the last couple days I made the exchange and thought I should save an outline of the steps for posterity.
Connect the new drive through your preferred method, I chose USB.
Log into the server with SSH.
Identify the new drive with:
[Read More]