Proof of concept for working simple nginx service
This commit is contained in:
parent
0f7f95a1b0
commit
2fc151251e
37
lab/cluster/hello.tf
Normal file
37
lab/cluster/hello.tf
Normal file
@ -0,0 +1,37 @@
|
||||
resource kubernetes_pod nginx_plain {
|
||||
metadata {
|
||||
name = "plain-service"
|
||||
labels = {
|
||||
app = "plain-app"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
image = "nginx"
|
||||
name = "plain-hello"
|
||||
env {
|
||||
name = "arbitrary"
|
||||
value = "rando value"
|
||||
}
|
||||
port {
|
||||
container_port = 80
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource kubernetes_service nginx_plain {
|
||||
metadata {
|
||||
name = "plain-service"
|
||||
}
|
||||
spec {
|
||||
selector = {
|
||||
app = kubernetes_pod.nginx_plain.metadata.0.labels.app
|
||||
}
|
||||
port {
|
||||
port = 8080
|
||||
target_port = 80
|
||||
}
|
||||
type = "LoadBalancer"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user