From 7f5d81f0ee59f3cd6dd387fdff48d3275a4b59fe Mon Sep 17 00:00:00 2001 From: shockrah Date: Wed, 17 Sep 2025 22:37:03 -0700 Subject: [PATCH] Deployment and Service for a simple health check tier service --- infra/vultr-kubernetes/health.tf | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 infra/vultr-kubernetes/health.tf diff --git a/infra/vultr-kubernetes/health.tf b/infra/vultr-kubernetes/health.tf new file mode 100644 index 0000000..788395b --- /dev/null +++ b/infra/vultr-kubernetes/health.tf @@ -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" + } + } +} \ No newline at end of file