Skip to content

Commit

Permalink
docs: add Gateway API example to the "Getting started" guide (#1607)
Browse files Browse the repository at this point in the history
Signed-off-by: Navendu Pottekkat <navendu@apache.org>
  • Loading branch information
pottekkat authored Jan 21, 2023
1 parent 31714eb commit 7c809c6
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions docs/en/latest/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ 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.

<Tabs
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">
Expand All @@ -65,7 +66,7 @@ spec:
</TabItem>
<TabItem value="kubernetes">
<TabItem value="ingress">
```yaml title="httpbin-route.yaml"
apiVersion: networking.k8s.io/v1
Expand All @@ -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>
Expand Down

0 comments on commit 7c809c6

Please sign in to comment.