Why Kubernetes + Terraform Is a Great idea

Freek Mencke
3 min readJun 30, 2020
Photo by Marcus Lenk on Unsplash

Managing a Kubernetes cluster can be tough for multiple reasons. What would you do, for example, if you mess something up and the entire cluster breaks? It’s everyone’s nightmare. You may think that doesn’t happen, but Spotify destroyed 2 out of 3 of their production clusters. They gave a great talk at KubeCon & CloudNativeCon EU about this.

So what if you end up in this situation? How would you solve it? Do you just start applying YAMLs you’ve hopefully stored somewhere on a brand new cluster? Are you sure you have all YAMLs and commands to get your cluster up and running the way it used to? Who knows what commands your team might have executed on the cluster while you weren’t looking…

Are you sure you have all YAMLs and commands to get your cluster up and running the way it used to?

You might already use a tool like Git to store your YAMLs. But there is no way of knowing which files are applied on the cluster and which ones are not. The files in your repo are not a representation of the state of your cluster. Besides, how are you going to apply all these files? By hand? In what order?

Terraform

In comes Terraform. Terraform is a tool created by HashiCorp that allows us to predictably create…

--

--

Freek Mencke

Code enthousiast and Software Developer at Delen Private Bank. My passion extends beyond the job – I enjoy creating projects that bring ideas to life.