-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployments.tf
58 lines (53 loc) · 889 Bytes
/
deployments.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
/*
resource "kubernetes_deployment" "punk-do-devops" {
metadata {
name = var.app
labels = {
app = var.app
}
}
spec {
replicas = 1
selector {
match_labels = {
app = var.app
}
}
template {
metadata {
labels = {
app = var.app
}
}
spec {
container {
image = "camillamartins/dockernode:latest"
name = var.app
port {
container_port = 8080
host_port = 30201
}
}
}
}
}
depends_on = [module.kind_cluster]
}
resource "kubernetes_service" "app" {
metadata {
name = var.app
}
spec {
selector = {
App = var.app
}
port {
node_port = 30201
port = 8080
target_port = 8080
}
type = "NodePort"
}
depends_on = [module.kind_cluster]
}
*/