Menu

1 / 5

Terraform Kubernetes Provider: Deployment Guide and Examples

DEV Community: terraform·Michael Zion·1 day ago
#N4EHQeeF
#devtoterraform#devto#dev#terraform#name
Reading 0:00
15s threshold

This guide was written by Arthur Azrieli , CTO at MeteorOps, and first published on the MeteorOps blog .

Bottom line

You can deploy and manage Kubernetes resources with Terraform using the official hashicorp/kubernetes provider. It gives you typed resources such as kubernetes_deployment_v1 , kubernetes_service_v1 and kubernetes_ingress_v1 , a generic kubernetes_manifest resource for anything else (including custom resources), and it pairs with the hashicorp/helm provider for charts. Terraform plans the change, shows you a diff, and keeps everything in state next to the cloud resources it depends on.

The harder question is where Terraform should stop. Our short answer, from running this at startups and scale-ups: use Terraform for the cluster and the platform layer it needs to be useful (namespaces, RBAC, storage classes, the ingress controller, cert-manager, external-dns, and the GitOps controller itself), and hand application workloads to a GitOps tool such as Argo CD or Flux.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.