gcloud-lab/modules/nodepool-gpu.tf

47 lines
839 B
HCL

resource "google_container_node_pool" "gpu_pool" {
name = "gpu-pool-l4"
location = "us-central1-a"
cluster = google_container_cluster.primary.name
initial_node_count = 1
autoscaling {
min_node_count = 1
max_node_count = 1
}
node_config {
machine_type = "g2-standard-8" # Optimized for NVIDIA L4
guest_accelerator {
type = "nvidia-l4"
count = 1
gpu_driver_installation_config {
gpu_driver_version = "LATEST"
}
}
spot = false
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
]
labels = {
workload = "llm-analyst"
}
taint {
key = "nvidia.com/gpu"
value = "present"
effect = "NO_SCHEDULE"
}
}
management {
auto_repair = true
auto_upgrade = true
}
}