Update 2020-04-02-Improvements-to-the-Ingress-API-in-Kubernetes-1.18.md

Fixed wildcard host match examples.
This commit is contained in:
Ivan Kurnosov
2020-04-08 14:54:08 +12:00
committed by GitHub
parent 2595ff7221
commit 3fbbd2ae37
@@ -52,9 +52,9 @@ IngressClass resource will ensure that new Ingresses without an `ingressClassNam
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? |
| ------------- |-------------| -----|
| `*.foo.com` | `*.foo.com` | Matches based on shared suffix |
| `*.foo.com` | `*.foo.com` | No match, wildcard only covers a single DNS label |
| ----------- |-------------------| --------------------------------------------------|
| `*.foo.com` | `bar.foo.com` | Matches based on shared suffix |
| `*.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 |
### Putting it All Together