Source: medium.com

Terraform vs Helm

Category: Kubernetes, Docker, Terraform, yaml

In this post I will talk about my experience working with Terraform and kubernetes, some similarities, and the things that I liked about working with Terraform and kubernetes, and some best practices to work with Terraform and kubernetes. Helm is a tool that help you install and manage kubernetes applications, for example if you want to install MySql in kubernetes you only need to download one of the repositories from helm and install it.

Terraform work with providers such as AWS, Azure, Google Cloud, Docker and many others, one of that provisioners is Kubernetes.

Maybe they have some similarities but are not the same, for example with terraform you can create kubernetes cluster something that is not possible, another important difference is the Helm registry where you can find a lot of charts for different purposes and form official providers, with Terraform also you have a registry with different modules but at the time this post is written I didn’t find modules for Kubernetes.

I found simple pass from YAML files to HCL that is the configuration file used by Terraform, this is an example of how a deployment looks in Terraform: Also it’s possible convert a YAML file to HCL with a Terraform function: Using modules as templates it’s one of the things that I think is easier to write with Terraform, It’s simple write modules and find the variables necessaries to that module, you can set default variables and overwrite this for specific configurations.

Related Articles