Created
May 1, 2022 19:40
-
-
Save mynameisameed/7e934fbd568fca9271d7c7380dfab0a8 to your computer and use it in GitHub Desktop.
You need this file to create GKE Cluster & configuration with terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "gke" { | |
source = "terraform-google-modules/kubernetes-engine/google" | |
project_id = var.project_id | |
name = var.name | |
region = var.region | |
zones = var.zones | |
network = "default" | |
subnetwork = "default" | |
ip_range_pods = "" | |
ip_range_services = "" | |
http_load_balancing = false | |
network_policy = true | |
horizontal_pod_autoscaling = true | |
filestore_csi_driver = false | |
node_pools = [ | |
{ | |
name = "default-node-pool" | |
machine_type = var.machine_type | |
node_locations = "us-central1-b,us-central1-c" | |
min_count = var.min_count | |
max_count = var.max_count | |
local_ssd_count = var.disk_size_gb | |
disk_type = "pd-standard" | |
image_type = "COS_CONTAINERD" | |
auto_repair = true | |
auto_upgrade = true | |
service_account = var.service_account | |
preemptible = false | |
initial_node_count = var.initial_node_count | |
}, | |
] | |
node_pools_oauth_scopes = { | |
all = [] | |
default-node-pool = [ | |
"https://www.googleapis.com/auth/cloud-platform", | |
] | |
} | |
node_pools_labels = { | |
all = {} | |
default-node-pool = { | |
default-node-pool = true | |
} | |
} | |
node_pools_metadata = { | |
all = {} | |
default-node-pool = { | |
node-pool-metadata-custom-value = "my-node-pool" | |
} | |
} | |
node_pools_taints = { | |
all = [] | |
default-node-pool = [ | |
{ | |
key = "default-node-pool" | |
value = true | |
effect = "PREFER_NO_SCHEDULE" | |
}, | |
] | |
} | |
node_pools_tags = { | |
all = [] | |
default-node-pool = [ | |
"default-node-pool", | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment