reconfigured nodepool
This commit is contained in:
parent
99cf482ba7
commit
dee0d4c2d1
4 changed files with 10 additions and 9 deletions
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
tls:
|
tls:
|
||||||
mode: Terminate
|
mode: Terminate
|
||||||
options:
|
options:
|
||||||
networking.gke.io/pre-shared-certs: customer1-n8n-cert
|
networking.gke.io/pre-shared-certs: devops-lab-cert
|
||||||
allowedRoutes:
|
allowedRoutes:
|
||||||
namespaces:
|
namespaces:
|
||||||
from: All
|
from: All
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
resource "google_container_cluster" "primary" {
|
resource "google_container_cluster" "primary" {
|
||||||
name = "devops-lab-cluster"
|
name = "devops-lab-cluster"
|
||||||
location = "us-central1-a"
|
location = "us-central1-a"
|
||||||
|
remove_default_node_pool = true
|
||||||
initial_node_count = 1
|
initial_node_count = 1
|
||||||
|
|
||||||
datapath_provider = "ADVANCED_DATAPATH"
|
datapath_provider = "ADVANCED_DATAPATH"
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,21 @@ resource "google_container_node_pool" "cluster" {
|
||||||
name = "devops-lab-nodepool"
|
name = "devops-lab-nodepool"
|
||||||
location = "us-central1-a"
|
location = "us-central1-a"
|
||||||
cluster = google_container_cluster.primary.name
|
cluster = google_container_cluster.primary.name
|
||||||
|
initial_node_count = 1
|
||||||
network_config {
|
network_config {
|
||||||
pod_range = "pod-ranges"
|
pod_range = "pod-ranges"
|
||||||
}
|
}
|
||||||
initial_node_count = 2
|
|
||||||
|
|
||||||
autoscaling {
|
autoscaling {
|
||||||
min_node_count = 1
|
min_node_count = 1
|
||||||
max_node_count = 16
|
max_node_count = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
node_config {
|
node_config {
|
||||||
machine_type = "e2-standard-2"
|
machine_type = "e2-standard-2"
|
||||||
disk_size_gb = 25
|
spot = true
|
||||||
disk_type = "pd-ssd"
|
disk_size_gb = 20
|
||||||
|
disk_type = "pd-standard"
|
||||||
oauth_scopes = [
|
oauth_scopes = [
|
||||||
"https://www.googleapis.com/auth/cloud-platform"
|
"https://www.googleapis.com/auth/cloud-platform"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
|
|
||||||
|
data "google_client_config" "default" {}
|
||||||
provider "google" {
|
provider "google" {
|
||||||
credentials = file("~/.config/gcloud/application_default_credentials.json")
|
credentials = file("~/.config/gcloud/application_default_credentials.json")
|
||||||
project = "devops-lab-cluster"
|
project = "devops-lab-cluster"
|
||||||
region = "us-central1" # Or your desired region/location
|
region = "us-central1" # Or your desired region/location
|
||||||
}
|
}
|
||||||
|
|
||||||
data "google_client_config" "default" {}
|
|
||||||
|
|
||||||
provider "helm" {
|
provider "helm" {
|
||||||
kubernetes = {
|
kubernetes {
|
||||||
host = "https://${google_container_cluster.primary.endpoint}"
|
host = "https://${google_container_cluster.primary.endpoint}"
|
||||||
token = data.google_client_config.default.access_token
|
token = data.google_client_config.default.access_token
|
||||||
cluster_ca_certificate = base64decode(google_container_cluster.primary.master_auth[0].cluster_ca_certificate)
|
cluster_ca_certificate = base64decode(google_container_cluster.primary.master_auth[0].cluster_ca_certificate)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue