This module creates and configures Google Kubernetes Engine clusters and node pools with common networking and policy options.
Overview
The Terraform Kubernetes Engine module provisions Google Cloud Platform GKE resources from Terraform configurations. It targets opinionated cluster creation with node pools, optional network policy, IP masquerading, and DNS adjustments when stub domains are supplied.
Applying the module can create a GKE cluster with selected add-ons, attach configured node pools, replace default kube-dns settings when needed, enable network policy when requested, and install ip-masq-agent configuration for chosen-CIDR masquerading.
Additional submodules focus on private clusters, beta private clusters, and beta public clusters for newer GKE beta features. Examples and registry documentation show wiring the Google and Kubernetes providers after cluster creation for follow-on Kubernetes resources.
Operations follow typical Terraform init, plan, apply, and destroy flows on a project that references the module source. It is infrastructure code for GKE, not a managed service users log into directly.
Key features
- GKE cluster provisioning
- Configurable node pools
- Network policy activation
- IP masquerade agent setup
- Stub domain DNS overrides
- Private cluster submodules
- Beta public and private variants
- Broad addon and security toggles
Use cases
- Standard GKE cluster bootstrap
- Private GKE networking setups
- Multi-pool GPU or spot workloads
- Clusters with custom DNS behavior
- Terraform-driven Kubernetes foundations