diff --git a/infra/vultr-kubernetes/k8s/shockrah-xyz.tf b/infra/vultr-kubernetes/k8s/shockrah-xyz.tf index 6e764bd..de25bb4 100644 --- a/infra/vultr-kubernetes/k8s/shockrah-xyz.tf +++ b/infra/vultr-kubernetes/k8s/shockrah-xyz.tf @@ -18,46 +18,21 @@ resource kubernetes_pod shockrah { } } -# Expose the pod above with a simple service resource kubernetes_service shockrah { metadata { name = var.shockrahxyz.name namespace = kubernetes_namespace.websites.metadata.0.name + labels = { + app = var.shockrahxyz.name + } } spec { selector = { - app = kubernetes_pod.shockrah.metadata.0.labels.app + app = kubernetes_pod.shockrah.metadata.0.name } port { - port = var.shockrahxyz.port - target_port = 80 + port = 80 } - type = "ExternalName" - external_name = var.shockrahxyz.dns + type = "LoadBalancer" } } - -resource kubernetes_ingress_v1 shockrah { - metadata { - name = "shockrah" - } - spec { - rule { - http { - path { - path = "/" - backend { - service { - name = var.shockrahxyz.name - port { - number = var.shockrahxyz.port - } - } - } - } - } - } - } -} - -