Is there a way to do combination of host and port based routing using ingress controllers? I went through ingress-nginx/exposing-tcp-udp-services.md at main · kubernetes/ingress-nginx · GitHub documentation. But from the doc I’m inferring that it will always get routed to only one service, regardless of any host. Below is our use case
{
server host1.mydomain.com;
listen 443 ssl;
....
location / {
proxy_pass http://namespace-1-service-a:8080;
}
}
{
server host1.mydomain.com;
listen 8443 ssl;
ssl_verify_client_cert on; # verifying client certificate when the same endpoint is reached via 8443 port
location / {
proxy_pass http://namespace-1-service-a:8080;
}
}
{
server host2.mydomain.com;
listen 443 ssl;
....
location / {
proxy_pass http://namespace-2-service-a:8080;
}
...
}
Above kind of configs are possible in nginx as such. But with ingress controller is it possible to achieve it? How these kind of use cases are solved widely when people are adopting Kubernetes?