Deployment and Service for a simple health check tier service
This commit is contained in:
parent
410790765f
commit
7f5d81f0ee
47
infra/vultr-kubernetes/health.tf
Normal file
47
infra/vultr-kubernetes/health.tf
Normal file
@ -0,0 +1,47 @@
|
||||
resource kubernetes_deployment health {
|
||||
metadata {
|
||||
name = "health"
|
||||
namespace = var.playground.namespace
|
||||
}
|
||||
spec {
|
||||
replicas = 1
|
||||
selector {
|
||||
match_labels = {
|
||||
name = "health"
|
||||
}
|
||||
}
|
||||
template {
|
||||
metadata {
|
||||
labels = {
|
||||
name = "health"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
name = "health"
|
||||
image = "quanhua92/whoami:latest"
|
||||
port {
|
||||
container_port = "8080"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource kubernetes_service health {
|
||||
metadata {
|
||||
name = "health"
|
||||
namespace = var.playground.namespace
|
||||
}
|
||||
spec {
|
||||
selector = {
|
||||
name = "health"
|
||||
}
|
||||
port {
|
||||
port = 80
|
||||
target_port = 8080
|
||||
name = "http"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user