Hello!
I'm struggling for a day now with traefik. I'm using CRD in Terraform for creating ingressroute to my container which exposes two ports via ClusterIP:
8080/TCP,8887/TCP
First one (8080) should be used for all HTTP requests -> redirect them to HTTPS and this is working fine. Can you please advise on how to expose another port (8887) for websocket requests?
HTTP ingressroute:
"spec" = {
"entryPoints" = ["web"]
"routes" = [
{
"kind" = "Rule"
"match" = "Host(`${var.dns_name}`)"
"middlewares" = [
{
"name" = "redirect-https"
"namespace" = local.ingress_namespace
}
]
"services" = [
{
"name" = local.ingress_backend_service_name
"port" = "8080"
}
]
HTTPS middleware:
resource "kubernetes_manifest" "middleware_https" {
manifest = {
"apiVersion" = "traefik.containo.us/v1alpha1"
"kind" = "Middleware"
"metadata" = {
"name" = "redirect-https"
"namespace" = local.ingress_namespace
}
"spec" = {
"redirectScheme" = {
"permanent" = true
"port" = "443"
"scheme" = "https"
}
}
}
}