forked from yevgenis-shapiro/terraform-terrakube-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster.tf
45 lines (38 loc) · 964 Bytes
/
cluster.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
# kind_cluster.tf
provider "kind" {
}
provider "kubernetes" {
config_path = pathexpand(var.kind_cluster_config_path)
}
resource "kind_cluster" "default" {
name = var.kind_cluster_name
kubeconfig_path = pathexpand(var.kind_cluster_config_path)
wait_for_ready = true
kind_config {
kind = "Cluster"
api_version = "kind.x-k8s.io/v1alpha4"
node {
role = "control-plane"
image = "kindest/node:v1.23.4"
kubeadm_config_patches = [
"kind: InitConfiguration\nnodeRegistration:\n kubeletExtraArgs:\n node-labels: \"ingress-ready=true\"\n"
]
extra_port_mappings {
container_port = 80
host_port = 80
}
extra_port_mappings {
container_port = 443
host_port = 443
}
}
node {
role = "worker"
image = "kindest/node:v1.23.4"
}
node {
role = "worker"
image = "kindest/node:v1.23.4"
}
}
}