News

Deploying Kubernetes with Terraform & Terraform with Kubernetes — Plus the Kubernetes Manifest Resource GA

Learn how to create and configure a K8s cluster with HashiCorp Terraform, then deploy the Terraform Cloud operator which can deploy another K8s cluster.

Terraform is becoming one of the best tools for managing Kubernetes clusters as well as configuring and managing your workloads inside those Kubernetes clusters.

In this HashiConf Global 2021 talk, Terraform Providers Product Lead Phil Sautter shares a demo on some of the projects that are making this happen, both from HashiCorp and from the community. He also covers some of the best practices for using them. Topics include the Terraform operator, which enables management of your infrastructure as code from within Kubernetes, and the kubernetes_manifest resource in the Terraform Kubernetes provider, which has now reached general availability status.

Terraform Kubernetes Provider's Kubernetes Manifest Resource Now GA

To kick off his talk, Phil announces the general availability of the kubernetes_manifest resource in the Terraform Kubernetes provider. This resource covers all Kubernetes resources within Terraform. It's an analog for your YAML Kubernetes manifests, meaning you can do anything you could do with YAML, but with HashiCorp Config Language (HCL) inside Terraform instead. It also uses server side apply so that you can use Kubernetes as the source of truth instead of relying only on the Terraform state. Lastly, it includes support for managed fields and you can select and specify which fields you want Terraform to ignore.

Demo: It's Terraform All the Way Down

After the announcement, this talk will feature a demo showing you how to do four things:

  • Create a Kubernetes cluster with Terraform

  • Configure a Kubernetes cluster with Terraform

  • Deploy the Terraform Cloud operator

  • Use the Terraform Cloud operator to deploy another Kubernetes cluster

More resources like this one