This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push: new 7c809c68 docs: add Gateway API example to the "Getting started" guide (#1607) 7c809c68 is described below commit 7c809c6881fe48a4675399880333e2f3d7cc762a Author: Navendu Pottekkat <nave...@apache.org> AuthorDate: Sun Jan 22 05:27:23 2023 +0530 docs: add Gateway API example to the "Getting started" guide (#1607) Signed-off-by: Navendu Pottekkat <nave...@apache.org> --- docs/en/latest/getting-started.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/docs/en/latest/getting-started.md b/docs/en/latest/getting-started.md index 42b37c55..0a821fb7 100644 --- a/docs/en/latest/getting-started.md +++ b/docs/en/latest/getting-started.md @@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem'; APISIX ingress controller is a [Kubernetes ingress controller](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) using [Apache APISIX](https://apisix.apache.org) as the high performance reverse proxy. -APISIX ingress controller can be configured using native Kubernetes ingress resources as well as a declarative and easy to use custom resources provided by APISIX. The APISIX ingress controller converts these resources to APISIX configuration. +APISIX ingress controller can be configured using the native Kubernetes Ingress or Gateway API as well as with the declarative and easy to use custom resources provided by APISIX. The APISIX ingress controller converts these resources to APISIX configuration. The examples below show how these differ. Both the examples configure a Route in APISIX that routes to an httpbin service as the Upstream. @@ -39,8 +39,9 @@ The examples below show how these differ. Both the examples configure a Route in groupId="resources" defaultValue="apisix" values={[ -{label: 'APISIX Ingress custom resource', value: 'apisix'}, -{label: 'Kubernetes ingress resource', value: 'kubernetes'}, +{label: 'APISIX Ingress CRD', value: 'apisix'}, +{label: 'Kubernetes Ingress API', value: 'ingress'}, +{label: 'Kubernetes Gateway API', value: 'gateway'}, ]}> <TabItem value="apisix"> @@ -65,7 +66,7 @@ spec: </TabItem> -<TabItem value="kubernetes"> +<TabItem value="ingress"> ```yaml title="httpbin-route.yaml" apiVersion: networking.k8s.io/v1 @@ -87,6 +88,28 @@ spec: pathType: Prefix ``` +</TabItem> + +<TabItem value="gateway"> + +```yaml title="httpbin-route.yaml" +apiVersion: gateway.networking.k8s.io/v1alpha2 +kind: HTTPRoute +metadata: + name: httpbin-route +spec: + hostnames: + - local.httpbin.org + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: httpbin + port: 80 +``` + </TabItem> </Tabs>