gcloud-lab/modules/nodepool.tf

28 lines
575 B
Terraform
Raw Normal View History

resource "google_container_node_pool" "cluster" {
name = "devops-lab-nodepool"
location = "us-central1-a"
cluster = google_container_cluster.primary.name
2026-01-25 21:38:27 +00:00
initial_node_count = 1
network_config {
2026-01-06 01:20:24 +00:00
pod_range = "pod-ranges"
}
autoscaling {
min_node_count = 1
2026-01-25 21:38:27 +00:00
max_node_count = 5
}
node_config {
machine_type = "e2-standard-2"
2026-01-25 21:38:27 +00:00
spot = true
disk_size_gb = 20
disk_type = "pd-standard"
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
]
}
depends_on = [google_container_cluster.primary]
}