idk loadbalancer works now with cname i guess

This commit is contained in:
shockrah 2024-06-24 23:04:41 -07:00
parent 2df78721e4
commit 3bb611548d

View File

@ -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
}
}
}
}
}
}
}
}