Availability
Introduction
The Kubernetes Gateway API is a set of Kubernetes resources that describe how traffic from outside a cluster reaches the services inside it. Kubernetes Ingress is frozen, and new routing features go into the Kubernetes Gateway API instead. The Kubernetes Gateway API separates the responsibilities of the people involved:- A platform team defines which gateway implementations are available, and runs the gateways.
- Application teams define routes that send traffic from a gateway to their services.
GatewayClass, Gateway and HTTPRoute resources, and Tyk Operator turns each route into Tyk OAS APIs on your Tyk Gateways. You can then add Tyk features, such as authentication and rate limits, to those APIs.
In this documentation, Kubernetes Gateway API means the Kubernetes specification. The Tyk Gateway API is the REST API that manages a Tyk Gateway.
Choosing How to Manage APIs in Kubernetes
Tyk Operator gives you three ways to manage APIs in Kubernetes:
You can use all three in the same cluster. With the Kubernetes Gateway API and Kubernetes Ingress, Tyk Operator creates the APIs for you. With the Tyk custom resources, you write the API definitions yourself.
How Tyk Operator Implements the Kubernetes Gateway API
Each Kubernetes Gateway API resource maps to a part of your Tyk deployment:
You link the Kubernetes resources to your Tyk deployment with OperatorContext resources:
- The
GatewayClassrefers to an OperatorContext that holds the connection details of Tyk Dashboard. - Each
Gatewayrefers to an OperatorContext that identifies its data plane. This OperatorContext names the Kubernetes Service in front of the Tyk Gateways, and the API sharding tags that those Tyk Gateways load.
What Tyk Operator Supports
Tyk Operator supports part of the Kubernetes Gateway API:
Tyk Operator creates one Tyk OAS API for each combination of parent
Gateway, hostname and path in a route. Each API has an ID that starts with gwapi-. For how Tyk Operator builds each API, and the full list of supported fields, see the Kubernetes Gateway API Reference.
Adding Tyk Features to a Route
An API that Tyk Operator creates from a route contains only routing configuration. To add authentication, rate limits and other Tyk features, attach a Tyk OAS API definition to the route. To apply the same features to every route on aGateway, attach the definition to the Gateway instead. A platform team can then set standard security for a whole Gateway, while application teams keep control of their routes.
To give clients access, reference the route in a Policy.
For the details, see Secure and Extend Routes.
How Tyk Operator Reports Results
Tyk Operator reports what it has done in thestatus of each resource, using the standard Kubernetes Gateway API conditions:
- The
GatewayClassand theGatewayreport whether Tyk Operator accepts them, and the address of theGateway. - Each
HTTPRoutereports, for each parentGateway, whether Tyk Operator has created its APIs, and whether it can resolve its upstream services. - Each attached
TykOasApiDefinitionreports whether it applies to its target.