Update 2020-04-02-Improvements-to-the-Ingress-API-in-Kubernetes-1.18.md
Fixed wildcard host match examples.
This commit is contained in:
+5
-5
@@ -51,11 +51,11 @@ IngressClass resource will ensure that new Ingresses without an `ingressClassNam
|
|||||||
## Support for Hostname Wildcards
|
## Support for Hostname Wildcards
|
||||||
Many Ingress providers have supported wildcard hostname matching like `*.foo.com` matching `app1.foo.com`, but until now the spec assumed an exact FQDN match of the host. Hosts can now be precise matches (for example “`foo.bar.com`”) or a wildcard (for example “`*.foo.com`”). Precise matches require that the http host header matches the Host setting. Wildcard matches require the http host header is equal to the suffix of the wildcard rule.
|
Many Ingress providers have supported wildcard hostname matching like `*.foo.com` matching `app1.foo.com`, but until now the spec assumed an exact FQDN match of the host. Hosts can now be precise matches (for example “`foo.bar.com`”) or a wildcard (for example “`*.foo.com`”). Precise matches require that the http host header matches the Host setting. Wildcard matches require the http host header is equal to the suffix of the wildcard rule.
|
||||||
|
|
||||||
| Host | Host header | Match? |
|
| Host | Host header | Match? |
|
||||||
| ------------- |-------------| -----|
|
| ----------- |-------------------| --------------------------------------------------|
|
||||||
| `*.foo.com` | `*.foo.com` | Matches based on shared suffix |
|
| `*.foo.com` | `bar.foo.com` | Matches based on shared suffix |
|
||||||
| `*.foo.com` | `*.foo.com` | No match, wildcard only covers a single DNS label |
|
| `*.foo.com` | `baz.bar.foo.com` | No match, wildcard only covers a single DNS label |
|
||||||
| `*.foo.com` | `foo.com` | No match, wildcard only covers a single DNS label |
|
| `*.foo.com` | `foo.com` | No match, wildcard only covers a single DNS label |
|
||||||
|
|
||||||
### Putting it All Together
|
### Putting it All Together
|
||||||
These new Ingress features allow for much more configurability. Here’s an example of an Ingress that makes use of pathType, `ingressClassName`, and a hostname wildcard:
|
These new Ingress features allow for much more configurability. Here’s an example of an Ingress that makes use of pathType, `ingressClassName`, and a hostname wildcard:
|
||||||
|
|||||||
Reference in New Issue
Block a user