Kubernetes | Ephemeral Kubernetes Lab with IaC and GitOps
I’ve been thinking of moving my Kubernetes lab into the cloud, but with cloud resource usage being scrutinized by the IT department, running them 24x7 the way I’m used to is a no-go. I need a setup that meets the following requirements:
Simple to create and tear down Applications must be pre-deployed when the cluster is up, as close to “just the way I left it there last night” as possible cost $0 when the setup has been switched off I eventually settled on the idea of an ephemeral Kubernetes lab environment using Infrastructure as Code (IaC) and GitOps practices, which I will cover in this post.
Automation | Terraform Maps
Intro I’ve been doing a lot with terraform lately, and I’ve been looking for ways to make my terraform configurations a lot simpler and have less repetition. Like a lot of people, I’ve found myself repeating the same code over and over. An example is where I repeat the same resource over and over but with different configuration parameters. It’s essentially the same resource. Why should I do this? There has to be a better way.