TLSRoute resource fields
The TLSRoute
resource sets the rules for routing traffic between Kubernetes service type backends (Service resources). TLSRoute
receives incoming traffic from the Gateway resources whose requirements it satisfies.
TLSRoute
is designed for application developers. Cluster operators should use Gateway
.
TLSRoute
is a Kubernetes resource specified by the Kubernetes Gateway API
TLSRoute
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata: <ObjectMeta>
spec: <TLSRouteSpec>
Field |
Value or type |
Description |
|
|
Required. |
|
|
Required. |
|
|
Required. |
|
|
Required. |
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 or type |
Description |
|
|
Required. This name is not the route name in Application Load Balancer. |
|
|
Namespace of the resource. The default value is |
TLSRouteSpec
parentRefs: <[]ParentReference>
hostnames: <[]Hostname>
rules: <[]TLSRouteRule>
Field |
Value or type |
Description |
|
|
Required. To get linked, the route must meet the rules described in the Gateway |
|
|
List of domain names matching the To refer to every possible subdomain at any level, replace the first-level domain name with an asterisk (
You cannot replace only a part of a first-level domain name with an asterisk, as in |
|
|
Required. |
ParentReference
name: <string>
namespace: <string>
sectionName: <string>
Field |
Value or type |
Description |
|
|
Required. |
|
|
Namespace of the By default, it matches the namespace of the |
|
|
Name of the listener specified in the |
TLSRouteRule
backendRefs:
- name: <string>
namespace: <string>
port: <int32>
weight: <int32>
Field |
Value or type |
Description |
|
|
Required. All the listed services will be placed in the same backend group. |
|
|
Required. The |
|
|
Namespace of the By default, it matches the namespace of the |
|
|
Service port number. This number must match one of the port numbers specified in the spec.ports.port fields of the |
|
|
Relative backend weight. In a backend group, traffic between backends is distributed in proportion to their weights. Weights must be specified either for all backends in a group, or for none. If weights are not specified, traffic is distributed to the backends as if they had identical positive weights. If a non-positive weight is specified, a backend will not receive traffic. |