TLSRoute resource fields
The TLSRoute
resource specifes routing rules for TLS traffic to Kubernetes services backends, i.e. Service resources. TLSRoute
receives incoming traffic that has passed through Gateway resource filters.
TLSRoute
is designed for application developers. Cluster operators should use the Gateway
resource.
TLSRoute
is a Kubernetes Gateway API
TLSRoute
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata: <ObjectMeta>
spec: <TLSRouteSpec>
Field |
Value / Type |
Description |
|
|
This is a required field. |
|
|
This is a required field. |
|
|
This is a required field. |
|
|
This is a required field. |
Example
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata:
name: sample-route
namespace: route-namespace
spec:
parentRefs:
- name: sample-gateway
sectionName: sample-listener
namespace: gateway-namespace
hostnames:
- "sample.example.com"
rules:
- backendRefs:
- name: sample-service
port: 80
ObjectMeta
name: <string>
namespace: <string>
Field |
Value / Type |
Description |
|
|
This is a required field. Do not mistake this name for the Application Load Balancer route name. |
|
|
Resource namespace. The default value is |
TLSRouteSpec
parentRefs: <[]ParentReference>
hostnames: <[]Hostname>
rules: <[]TLSRouteRule>
Field |
Value / Type |
Description |
|
|
This is a required field. For the |
|
|
Domain names matching the To match all subdomains at any level, use a wildcard
Wildcards must replace complete domain levels; for example, |
|
|
This is a required field. |
ParentReference
name: <string>
namespace: <string>
sectionName: <string>
Field |
Value / Type |
Description |
|
|
This is a required field. |
|
|
By default, it matches the |
|
|
Name of the listener specified in the |
TLSRouteRule
backendRefs:
- name: <string>
namespace: <string>
port: <int32>
weight: <int32>
Field |
Value / Type |
Description |
|
|
This is a required field. All services from this list will be placed in the same backend group. |
|
|
This is a required field. The referred |
|
|
By default, it matches the |
|
|
Service port number. The port number must match one of the |
|
|
Backend weight. Backends in a group receive traffic in proportion to their weights. You should either specify weights for all backends in a group, or not specify them at all. If weights are not specified, traffic will be equally distributed across backends. A backend with zero or negative weight will not be receiving traffic. |