reconfigured nodepool

This commit is contained in:
sirius0xdev 2026-01-25 21:38:27 +00:00
parent 99cf482ba7
commit dee0d4c2d1
4 changed files with 10 additions and 9 deletions

View file

@ -12,7 +12,7 @@ spec:
tls:
mode: Terminate
options:
networking.gke.io/pre-shared-certs: customer1-n8n-cert
networking.gke.io/pre-shared-certs: devops-lab-cert
allowedRoutes:
namespaces:
from: All

View file

@ -2,6 +2,7 @@
resource "google_container_cluster" "primary" {
name = "devops-lab-cluster"
location = "us-central1-a"
remove_default_node_pool = true
initial_node_count = 1
datapath_provider = "ADVANCED_DATAPATH"

View file

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

View file

@ -1,14 +1,14 @@
data "google_client_config" "default" {}
provider "google" {
credentials = file("~/.config/gcloud/application_default_credentials.json")
project = "devops-lab-cluster"
region = "us-central1" # Or your desired region/location
}
data "google_client_config" "default" {}
provider "helm" {
kubernetes = {
kubernetes {
host = "https://${google_container_cluster.primary.endpoint}"
token = data.google_client_config.default.access_token
cluster_ca_certificate = base64decode(google_container_cluster.primary.master_auth[0].cluster_ca_certificate)