kubernetes-ingress
kubernetes-ingress copied to clipboard
WildcardTLS with wildcard hostname for VirtualServer
When deploying a Virtual Server resource with the following TLS config :
yaml host: test.example.com tls: redirect: enable: true
With an ingress configured with a wildcardTLS secret valid for *.example.com does not expose the targeted service properly.
- A request to
http://test.example.comproperly redirects to the TLS endpoint https://test.example.com** uses the default certificate instead of the wildcard**https://test.example.com** does not proxy the request to the upstream service**
Env
- Kubernetes
1.20 - Nginx.org ingress controller
1.9.0
Aha! Link: https://nginx.aha.io/features/IC-101
Note : removing the tls: block altogether properly exposes the service on the HTTP endpoint
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
@pleshakov Do you mind explaining why this issue has been tagged proposal? It seems like a bug to me.
Hi @svvac
This was tagged as a proposal because from our point of view it is an enhancement rather than a bug. This wasn't included into the initial VirtualServer implementation (to reduce the scope), rather than something that is a result of an incorrect implementation.
Ok that makes sense, thanks for clarifying. So if I understand correctly, there is currently no way to use the wildcard certificate of the ingress in VirtualServers other than duplicating it?
So if I understand correctly, there is currently no way to use the wildcard certificate of the ingress in VirtualServers other than duplicating it?
that is correct.
One other possible workaround approach in case you have multiple namespaces:
- create VirtualServers in the namespace with that wildcard TLS secret
- configure TLS termination using that Secret for those VirtualServers
- Create VirtualServerRoutes and reference them from VirtualServers
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Just realized that this was accidentally re-opened by an automation integration. Sorry.