TLSRoute API Reference¶
Introduction¶
With integration of the Gateway API, AWS Gateway API Controller supports TLSRoute.
This allows you to define and manage end-to-end TLS encrypted traffic routing to your Kubernetes clusters.
Considerations¶
TLSRoutesectionName must refer to aTLSprotocol listener withmode: Passthroughin the parentRefsGateway. Thetls.modefield must be explicitly set on the listener.TLSRouteonly supports exactly one rule.- Each rule must have at least one
backendRef. TLSRoutedoes not support any rule matching condition.- The
hostnamesfield with exactly one host name is required. IP addresses are not allowed.
Example Configuration¶
Here is a sample configuration that demonstrates how to set up a TLSRoute resource to route end-to-end TLS encrypted traffic to a nginx service:
apiVersion: gateway.networking.k8s.io/v1
kind: TLSRoute
metadata:
name: nginx-tls-route
spec:
hostnames:
- nginx-test.my-test.com
parentRefs:
- name: my-hotel-tls-passthrough
sectionName: tls
rules:
- backendRefs:
- name: nginx-tls
kind: Service
port: 443
In this example:
- The
TLSRouteis namednginx-tls-routeand is associated with a parent gateway namedmy-hotel-tls-passthroughthat has a listener section namedtls: - The
TLSRouteis configured to route traffic to a k8s service namednginx-tlson port 443. - The
hostnamesfield is set tonginx-test.my-test.com. The customer must use this hostname to send traffic to the nginx service.
Cross-Cluster Routing with ServiceImport¶
TLSRoute supports routing to services in other clusters via ServiceImport.
The remote cluster must export the service using a ServiceExport with routeType: TLS.
apiVersion: gateway.networking.k8s.io/v1
kind: TLSRoute
metadata:
name: nginx-tls-route
spec:
hostnames:
- nginx-test.my-test.com
parentRefs:
- name: my-hotel-tls-passthrough
sectionName: tls
rules:
- backendRefs:
- name: nginx-tls
kind: ServiceImport
For the detailed tls passthrough traffic connectivity setup, please refer the user guide here.
For the detailed Gateway API TLSRoute resource specifications, you can refer to the
Kubernetes official documentation.
For the VPC Lattice tls passthrough Listener configuration details, you can refer to the VPC Lattice documentation.