mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-25 01:34:36 +01:00
39 lines
817 B
Terraform
39 lines
817 B
Terraform
|
resource "kubernetes_ingress_v1" "your-ingress" {
|
||
|
|
||
|
depends_on = [kubernetes_namespace.your-namespace]
|
||
|
|
||
|
metadata {
|
||
|
name = "your-ingress"
|
||
|
namespace = "your-namespace"
|
||
|
}
|
||
|
|
||
|
spec {
|
||
|
rule {
|
||
|
|
||
|
host = "your-domain"
|
||
|
|
||
|
http {
|
||
|
|
||
|
path {
|
||
|
path = "/"
|
||
|
|
||
|
backend {
|
||
|
service {
|
||
|
name = "your-service"
|
||
|
port {
|
||
|
number = 80
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# (Optional) Add an SSL Certificate
|
||
|
# tls {
|
||
|
# secret_name = "ssl-certificate-object"
|
||
|
# hosts = ["your-domain"]
|
||
|
# }
|
||
|
}
|
||
|
}
|