ingress: Update documentation for wildcard hostnames
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
This commit is contained in:
parent
248ecd10bf
commit
95a77e30db
|
@ -183,6 +183,20 @@ cases precedence will be given first to the longest matching path. If two paths
|
|||
are still equally matched, precedence will be given to paths with an exact path
|
||||
type over prefix path type.
|
||||
|
||||
## Hostname Wildcards
|
||||
Hosts can 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` | `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 |
|
||||
|
||||
{{< codenew file="service/networking/ingress-wildcard-host.yaml" >}}
|
||||
|
||||
## Ingress Class
|
||||
|
||||
Ingresses can be implemented by different controllers, often with different
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-wildcard-host
|
||||
spec:
|
||||
rules:
|
||||
- host: "foo.bar.com"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/bar"
|
||||
backend:
|
||||
service:
|
||||
name: service1
|
||||
port:
|
||||
number: 80
|
||||
- host: "*.foo.com"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/foo"
|
||||
backend:
|
||||
service:
|
||||
name: service2
|
||||
port:
|
||||
number: 80
|
Loading…
Reference in New Issue