AEP-0001 Gateway API support
Gateway API is dedicated to achieving expressive and scalable Kubernetes service networking through many custom resources.
Apache APISIX Ingress controller can realize richer functions by adding support for Gateway API, including Gateway management, multi-cluster support and other features.
- Improve ease of use
- Support lifecycle management of Apache APISIX Gateway
- Can bind the Apache APISIX Ingress controller with Gateway resources.
- The traffic rules defined by the Gateway API are processed by the Apache APISIX Gateway
- Supports all Gateway API versions and capabilities.
Add support from the definition of HTTP routing. Mainly cover the following resources:
We need to add a separate switch for the Gateway API to control whether to enable this feature, and add corresponding controllers for various resources.
These controllers can handle
gateway.networking.k8s.io/v1alpha2 version of
For real traffic definition rules, it needs to be translated into rules in Apache APISIX.
GatewayClass resources, we need to have a unique identifier. We can define
controllerName = apisix.apache.org/gateway-controller in the code.
After the creation is successful, you will see the following results.
➜ ~ kubectl get gatewayclass
NAME CONTROLLER AGE
apisix-lb apisix.apache.org/gateway-controller 7m
We need to update its Status.
Gateway resource, we have two stages:
- Binding the existing Apache APISIX data plane;
- Create a self-managed Apache APISIX Gateway;
- name: http
After correct processing, you will get the following results:
➜ ~ kubectl get gateway
NAME CLASS ADDRESS READY AGE
my-gateway apisix-lb 220.127.116.11 True 12m
HTTPRoute resource, we need to complete its translation to APISIX.
- name: my-gateway
- name: my-service1
- type: Exact
- type: Exact
- name: my-service2
Need to create the corresponding route on Apache APISIX.
- Use the e2e test case cover examples in the above document.
- We already have perfect e2e coverage
- Gateway API reaches GA