-
Notifications
You must be signed in to change notification settings - Fork 1
/
gke.tf
52 lines (44 loc) · 1.57 KB
/
gke.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
resource "google_container_cluster" "cluster" {
provider = "google-beta"
project = "${data.google_client_config.current.project}"
name = "knative"
region = "${data.google_client_config.current.region}"
min_master_version = "${data.google_container_engine_versions.available.latest_master_version}"
logging_service = "logging.googleapis.com"
monitoring_service = "monitoring.googleapis.com"
remove_default_node_pool = true
initial_node_count = 1
addons_config {
istio_config {
disabled = false
}
}
}
resource "google_container_node_pool" "cluster-np1" {
project = "${data.google_client_config.current.project}"
name = "${google_container_cluster.cluster.name}-np1"
region = "${data.google_client_config.current.region}"
cluster = "${google_container_cluster.cluster.name}"
node_count = 1
version = "${data.google_container_engine_versions.available.latest_node_version}"
management {
auto_repair = true
}
autoscaling {
min_node_count = 1
max_node_count = 10
}
node_config {
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring.write",
"https://www.googleapis.com/auth/service.management",
"https://www.googleapis.com/auth/servicecontrol",
]
image_type = "COS"
machine_type = "n1-standard-1"
}
}