Skip to content

Commit 7e146b6

Browse files
authored
docs: patch route with the correct apiVersion (#546)
1 parent f276216 commit 7e146b6

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

docs/en/latest/practices/proxy-the-httpbin-service.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,21 @@ In order to let Apache APISIX proxies requests to httpbin, we need to create an
4646

4747
```yaml
4848
# httpbin-route.yaml
49-
apiVersion: apisix.apache.org/v1
49+
apiVersion: apisix.apache.org/v2alpha1
5050
kind: ApisixRoute
5151
metadata:
5252
name: httpserver-route
5353
spec:
54-
rules:
55-
- host: local.httpbin.org
56-
http:
54+
http:
55+
- name: rule1
56+
match:
57+
hosts:
58+
- local.httpbin.org
5759
paths:
58-
- backend:
59-
serviceName: httpbin
60-
servicePort: 80
61-
path: /*
60+
- /*
61+
backend:
62+
serviceName: httpbin
63+
servicePort: 80
6264
```
6365
6466
The YAML snippet shows a simple `ApisixRoute` configuration, which tells Apache APISIX to route all requests with Host `local.httpbin.org` to the `httpbin` service.

0 commit comments

Comments
 (0)