-
Notifications
You must be signed in to change notification settings - Fork 0
/
kube-cluster-nodes.tf
142 lines (137 loc) · 5.66 KB
/
kube-cluster-nodes.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
module "kube_worker_1" {
source = "./modules/kubernetes-vms"
vm_name = "kubework01"
vm_ip_address = "10.1.1.13"
target_node = "shizuru"
vm_cpu_sockets = 1
vm_cpu_cores = 6
vm_memory = 24576
template_id = 103
ssh_private_key = var.ssh_private_key
kubernetes_type = "worker"
kubernetes_cluster_token = var.k8s_cluster_information[0].cluster_token
kubernetes_cluster_certificate_key = var.k8s_cluster_information[0].certificate_key
kubernetes_cacert_hash = var.k8s_cluster_information[0].cacert_hash
additional_disk_configurations = [
{
size = 100
storage_name = "local-lvm"
datastore_id = "local-lvm"
}
]
cloudflare_zone_id = var.cloudflare_zone_id
}
module "kube_worker_2" {
source = "./modules/kubernetes-vms"
vm_name = "kube1node02"
vm_ip_address = "10.1.1.14"
vm_cpu_sockets = 1
vm_cpu_cores = 12
vm_memory = 12288
template_id = 100
target_node = "grace"
ssh_private_key = var.ssh_private_key
kubernetes_type = "controller"
kubernetes_cluster_token = var.k8s_cluster_information[0].cluster_token
kubernetes_cluster_certificate_key = var.k8s_cluster_information[0].certificate_key
kubernetes_cacert_hash = var.k8s_cluster_information[0].cacert_hash
kubernetes_cluster_vip = "10.1.1.6"
additional_disk_configurations = [
{
size = 100
storage_name = "local-lvm"
}
]
make_controller_worker = true
cloudflare_zone_id = var.cloudflare_zone_id
}
module "kube_worker_3" {
source = "./modules/kubernetes-vms"
vm_name = "kube1node03"
vm_ip_address = "10.1.1.15"
vm_cpu_sockets = 1
vm_cpu_cores = 12
vm_memory = 12288
template_id = 113
target_node = "nia"
ssh_private_key = var.ssh_private_key
kubernetes_type = "controller"
kubernetes_cluster_token = var.k8s_cluster_information[0].cluster_token
kubernetes_cluster_certificate_key = var.k8s_cluster_information[0].certificate_key
kubernetes_cacert_hash = var.k8s_cluster_information[0].cacert_hash
kubernetes_cluster_vip = "10.1.1.6"
additional_disk_configurations = [
{
size = 100
storage_name = "local-lvm"
}
]
make_controller_worker = true
cloudflare_zone_id = var.cloudflare_zone_id
}
module "kube_worker_4" {
source = "./modules/kubernetes-vms"
vm_name = "kube1node04"
vm_ip_address = "10.1.1.40"
vm_cpu_sockets = 1
vm_cpu_cores = 6
vm_memory = 12288
template_id = 109
target_node = "lefi"
ssh_private_key = var.ssh_private_key
kubernetes_type = "worker"
kubernetes_cluster_token = var.k8s_cluster_information[0].cluster_token
kubernetes_cluster_certificate_key = var.k8s_cluster_information[0].certificate_key
kubernetes_cacert_hash = var.k8s_cluster_information[0].cacert_hash
additional_disk_configurations = [
{
size = 100
storage_name = "local-lvm"
}
]
cloudflare_zone_id = var.cloudflare_zone_id
}
module "kube_worker_5" {
source = "./modules/kubernetes-vms"
vm_name = "kube1node05"
vm_ip_address = "10.1.1.41"
vm_cpu_sockets = 1
vm_cpu_cores = 6
vm_memory = 12288
template_id = 106
target_node = "tear"
ssh_private_key = var.ssh_private_key
kubernetes_type = "worker"
kubernetes_cluster_token = var.k8s_cluster_information[0].cluster_token
kubernetes_cluster_certificate_key = var.k8s_cluster_information[0].certificate_key
kubernetes_cacert_hash = var.k8s_cluster_information[0].cacert_hash
additional_disk_configurations = [
{
size = 100
storage_name = "local-lvm"
}
]
cloudflare_zone_id = var.cloudflare_zone_id
}
module "kube_worker_6" {
source = "./modules/kubernetes-vms"
vm_name = "kube1node06"
vm_ip_address = "10.1.1.42"
vm_cpu_sockets = 1
vm_cpu_cores = 6
vm_memory = 12288
template_id = 112
target_node = "vern"
ssh_private_key = var.ssh_private_key
kubernetes_type = "worker"
kubernetes_cluster_token = var.k8s_cluster_information[0].cluster_token
kubernetes_cluster_certificate_key = var.k8s_cluster_information[0].certificate_key
kubernetes_cacert_hash = var.k8s_cluster_information[0].cacert_hash
additional_disk_configurations = [
{
size = 100
storage_name = "local-lvm"
}
]
cloudflare_zone_id = var.cloudflare_zone_id
}