Archive
Posts from 2020
Backing up your route53 zone configuration with the aws CLI
In a previous post, I discussed using the Kubernetes external-dns project to manage DNS changes. Prior to rolling it out, I needed a way to backup each zone prior to external-dns modifying it. I also wanted this to occur each time a commit occurred that resulted in a DNS change. This turned out to be super easy to do with the aws CLI…
$ read more →Exporting AWS Cloudwatch log streams to a local file
I love AWS, but when I'm debugging issues I prefer the Linux command line over Cloudwatch Logs Insights. Numerous AWS services store their log configuration inside cloudwatch, which presents a small challenge since my tooling (ripgrep, awk, jq, sed, etc.) can't directly access cloudwatch logs. The aws command line has a nifty get-log-events option which can solve this problem. It allows you to export logs from a log stream, and has several options to control what gets exported…
$ read more →Using external-dns to managed DNS entries in Kubernetes clusters
Kubernetes provides a service resource to distribute traffic across one or more pods. I won't go into detail on what a service is, since it's covered in-depth elsewhere. For Internet-facing applications, this Service will typically be of type LoadBalancer. If you are running in the "cloud," creating a service of type LoadBalancer will trigger cloud provider specific logic to provision an external load balancer (either private or public) with the target being your service…
$ read more →Notes from episode 70 of TGIK: Assuming AWS roles with kube2iam/kiam
Over the past few months I've been trying to learn everything there is to know about Kubernetes. Kubernetes is an amazing technology for deploying and scaling containers though it comes with a cost. It's an incredibly complex piece of software and there are a ton of bells and whistles to become familiar with. One way that I've found for coming up to speed is Joe Beda's weekly TGIK live broadcast…
$ read more →Verifying your .gitignore is working correctly
I was recently cleaning up an old Git repo, and noticed that some .pyc files got checked in. This got me thinking, and I started reading through the Git documentation to see if there was a way to evaluate .gitignore rules to make sure they were working as expected. Sure enough, Git has the "check-ignore" command. Given the following .gitignore: You can pass a pattern to "check-ignore" to get the list of files in your working directory that match the expression: Super handy…
$ read more →