While Kong supports routing based on host headers with wildcards, the Kubernetes Ingress API does not (see this issue for a discussion).
Other ingress controllers, like the nginx and traefik appear to have workarounds, either by allowing for a file-based configuration or by using a special Ingress annotation.
Are there plans for the Kong Ingress Controller to support this? It is surprising that the Kong Ingress Controller does not support the same configurations as the standard Kong.
Thanks for the reply. It looks like using a wildcard at the beginning of the host is supported by the native Kubernetes Ingress resource (but needs to be in quotes, which I just learned from your reply). However, we’d like the wildcard to be at the end of the host, so we can use rules like host: blue.* and host: green.* to alternate between blue/green deployments.
The error we get is:
# * spec.rules[0].host: Invalid value: "blue.*": a wildcard DNS-1123 subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character (e.g. '*.example.com', regex used for validation is '\*\.[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
# * spec.rules[0].host: Invalid value: "blue.*": a wildcard DNS-1123 subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character (e.g. '*.example.com', regex used for validation is '\*\.[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
#
That unfortunately is not possible at the Ingress level.
We could expand support for it by using host field from the KongIngress resource but then it almost renders the Ingress resource itself quite useless.