This is an automated email from the ASF dual-hosted git repository.
tokers 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 c9dd292 docs: update docs for website (#270)
c9dd292 is described below
commit c9dd2928649767bf916f3f9f3393af643e6b77b1
Author: 琚致远 <[email protected]>
AuthorDate: Thu Feb 25 18:14:37 2021 +0800
docs: update docs for website (#270)
---
docs/en/latest/CRD-specification.md | 209 ++++++++++-----------
docs/en/latest/FAQ.md | 11 +-
docs/en/latest/config.json | 28 +--
docs/en/latest/contribute.md | 25 ++-
docs/en/latest/deployments/ack.md | 21 +--
docs/en/latest/deployments/aws.md | 21 +--
docs/en/latest/deployments/azure.md | 25 +--
docs/en/latest/deployments/gke.md | 21 +--
docs/en/latest/deployments/k3s-rke.md | 23 +--
docs/en/latest/deployments/kubesphere.md | 19 +-
docs/en/latest/deployments/minikube.md | 19 +-
docs/en/latest/deployments/tke.md | 21 +--
docs/en/latest/design.md | 20 +-
docs/en/latest/development.md | 27 ++-
docs/en/latest/samples/index.md | 15 +-
.../proxy-the-httpbin-service-with-ingress.md | 17 +-
.../en/latest/samples/proxy-the-httpbin-service.md | 31 ++-
docs/en/latest/usage.md | 35 ++--
18 files changed, 268 insertions(+), 320 deletions(-)
diff --git a/docs/en/latest/CRD-specification.md
b/docs/en/latest/CRD-specification.md
index 2ea3f1f..c694350 100644
--- a/docs/en/latest/CRD-specification.md
+++ b/docs/en/latest/CRD-specification.md
@@ -1,3 +1,7 @@
+---
+title: CRD specification
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +21,6 @@
#
-->
----
-
-id: crd-specification
-title: CRD specification
-
----
-
In order to control the behavior of the proxy ([Apache
APISIX](https://github.com/apache/apisix)), the following CRDs should be
defined.
## CRD Types
@@ -54,37 +51,37 @@ metadata:
namespace: cloud
spec:
rules:
- - host: test.apisix.apache.org
- http:
- paths:
- - backend:
- serviceName: httpserver
- servicePort: 8080
- path: /hello*
- plugins:
- - name: limit-count
- enable: true
- config:
- count: 2
- time_window: 60
- rejected_code: 503
- key: remote_addr
+ - host: test.apisix.apache.org
+ http:
+ paths:
+ - backend:
+ serviceName: httpserver
+ servicePort: 8080
+ path: /hello*
+ plugins:
+ - name: limit-count
+ enable: true
+ config:
+ count: 2
+ time_window: 60
+ rejected_code: 503
+ key: remote_addr
```
-| Field | Type | Description
|
-| ----------- | ------- |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-| rules | array | ApisixRoute's request matching rules.
|
-| host | string | The requested host.
|
-| http | object | Route rules are applied to the scope of layer 7
traffic.
|
-| paths | array | Path-based `route` rule matching.
|
-| backend | object | Backend service information configuration.
|
-| serviceName | string | The name of backend service. `namespace +
serviceName + servicePort` form an unique identifier to match the back-end
service.
|
-| servicePort | int | The port of backend service. `namespace +
serviceName + servicePort` form an unique identifier to match the back-end
service.
|
-| path | string | The URI matched by the route. Supports exact match
and prefix match. Example,exact match: `/hello`, prefix match: `/hello*`.
|
-| plugins | array | Custom plugin collection (Plugins defined in the
`route` level). For more plugin information, please refer to the [Apache APISIX
plugin docs](https://github.com/apache/apisix/tree/master/doc/plugins). |
-| name | string | The name of the plugin. For more information about
the example plugin, please check the [limit-count
docs](https://github.com/apache/apisix/blob/master/doc/plugins/limit-count.md#Attributes).
|
-| enable | boolean | Whether to enable the plugin, `true`: means enable,
`false`: means disable.
|
-| config | object | Configuration of plugin information. Note: The check
of configuration schema is missing now, so please be careful when editing.
|
+| Field | Type | Description
|
+|---------------|----------|----------------------------------------------------|
+| rules | array | ApisixRoute's request matching rules.
|
+| host | string | The requested host.
|
+| http | object | Route rules are applied to the scope of layer 7
traffic. |
+| paths | array | Path-based `route` rule matching.
|
+| backend | object | Backend service information configuration.
|
+| serviceName | string | The name of backend service. `namespace +
serviceName + servicePort` form an unique identifier to match the back-end
service. |
+| servicePort | int | The port of backend service. `namespace +
serviceName + servicePort` form an unique identifier to match the back-end
service. |
+| path | string | The URI matched by the route. Supports exact
match and prefix match. Example,exact match: `/hello`, prefix match: `/hello*`.
|
+| plugins | array | Custom plugin collection (Plugins defined in the
`route` level). For more plugin information, please refer to the [Apache APISIX
plugin docs](https://github.com/apache/apisix/tree/master/doc/plugins). |
+| name | string | The name of the plugin. For more information
about the example plugin, please check the [limit-count
docs](https://github.com/apache/apisix/blob/master/doc/plugins/limit-count.md#Attributes).
|
+| enable | boolean | Whether to enable the plugin, `true`: means
enable, `false`: means disable. |
+| config | object | Configuration of plugin information. Note: The
check of configuration schema is missing now, so please be careful when
editing. |
**Support partial `annotation`**
@@ -96,7 +93,7 @@ kind: ApisixRoute
metadata:
annotations:
k8s.apisix.apache.org/ingress.class: apisix_group
- k8s.apisix.apache.org/ssl-redirect: "false"
+ k8s.apisix.apache.org/ssl-redirect: 'false'
k8s.apisix.apache.org/whitelist-source-range:
- 1.2.3.4/16
- 4.3.2.1/8
@@ -105,11 +102,11 @@ metadata:
spec:
```
-| Field | Type | Description
|
-| ---------------------------------------------- | ------- |
-------------------------------------------------------------------------------------------------------------------
|
-| `k8s.apisix.apache.org/ssl-redirect` | boolean | Whether to force
http redirect to https. `ture`: means to force conversion to https, `false`:
means not to convert. |
-| `k8s.apisix.apache.org/ingress.class` | string | Grouping of
ingress.
|
-| `k8s.apisix.apache.org/whitelist-source-range` | array | Whitelist of IPs
allowed to be accessed.
|
+| Field | Type |
Description |
+|------------------------------------------------|------------|--------------------------------------------------------------------|
+| `k8s.apisix.apache.org/ssl-redirect` | boolean | Whether to
force http redirect to https. `ture`: means to force conversion to https,
`false`: means not to convert. |
+| `k8s.apisix.apache.org/ingress.class` | string | Grouping of
ingress. |
+| `k8s.apisix.apache.org/whitelist-source-range` | array | Whitelist of
IPs allowed to be accessed. |
## ApisixUpstream
@@ -140,9 +137,9 @@ spec:
selector:
app: httpbin
ports:
- - name: http
- port: 80
- targetPort: 8080
+ - name: http
+ port: 80
+ targetPort: 8080
```
The above example shows that
[ewma](https://linkerd.io/2016/03/16/beyond-round-robin-load-balancing-for-latency/)
is used as the load balancer for Service `httpbin`.
@@ -259,10 +256,10 @@ spec:
loadbalancer:
type: roundrobin
portLevelSettings:
- - port: 7000
- scheme: http
- - port: 7001
- scheme: grpc
+ - port: 7000
+ scheme: http
+ - port: 7001
+ scheme: grpc
---
apiVersion: v1
kind: Service
@@ -272,12 +269,12 @@ spec:
selector:
app: foo
portLevelSettings:
- - name: http
- port: 7000
- targetPort: 7000
- - name: grpc
- port: 7001
- targetPort: 7001
+ - name: http
+ port: 7000
+ targetPort: 7000
+ - name: grpc
+ port: 7001
+ targetPort: 7001
```
The `foo` service exposes two ports, one of them use HTTP protocol and the
other uses grpc protocol.
@@ -288,51 +285,51 @@ In the meanwhile, the ApisixUpstream `foo` sets `http`
scheme for port `7000` an
### Configuration References
-| Field | Type
| Description
|
-| ------------------------------------------ |
------------------------------------- |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-| scheme | string
| The protocol used to talk to the Service, can be `http`, `grpc`,
default is `http`.
|
-| loadbalancer | object
| The load balancing algorithm of this upstream service
|
-| loadbalancer.type | string
| The load balancing type, can be `roundrobin`, `ewma`, `least_conn`,
`chash`, default is `roundrobin`.
|
-| loadbalancer.hashOn | string
| The hash value source scope, only take effects if the `chash` algorithm
is in use. Values can `vars`, `header`, `vars_combinations`, `cookie` and
`consumers`, default is `vars`.
|
-| loadbalancer.key | string
| The hash key, only in valid if the `chash` algorithm is used.
|
-| retries | int
| The retry count.
|
-| timeout | object
| The timeout settings.
|
-| timeout.connect | time duration in the form
"72h3m0.5s" | The connect timeout.
|
-| timeout.read | time duration in the form
"72h3m0.5s" | The read timeout.
|
-| timeout.send | time duration in the form
"72h3m0.5s" | The send timeout.
|
-| healthCheck | object
| The health check parameters, see [Health
Check](https://github.com/apache/apisix/blob/master/doc/health-check.md) for
more details.
|
-| healthCheck.active | object
| active health check configuration, which is a mandatory field.
|
-| healthCheck.active.type | string
| health check type, can be `http`, `https` and `tcp`, default is `http`.
|
-| healthCheck.active.timeout | time duration in the form
"72h3m0.5s" | the timeout settings for the probe, default is `1s`.
|
-| healthCheck.active.concurrency | int
| how many probes can be sent simultaneously, default is `10`.
|
-| healthCheck.active.host | string
| host header in http probe request, only in valid if the active health
check type is `http` or `https`.
|
-| healthCheck.active.port | int
| target port to receive probes, it's necessary to specify this field if
the health check service exposes by different port, note the port value here is
the container port, not the service port.
|
-| healthCheck.active.httpPath | string
| the HTTP URI path in http probe, only in valid if the active health
check type is `http` or `https`.
|
-| healthCheck.active.strictTLS | boolean
| whether to use the strict mode when use TLS, only in valid if the
active health check type is `https`, default is `true`.
|
-| healthCheck.active.requestHeaders | array of string
| Extra HTTP requests carried in the http probe, only in valid if the
active health check type is `http` or `https`.
|
-| healthCheck.active.healthy | object
| The conditions to judge an endpoint is healthy.
|
-| healthCheck.active.healthy.successes | int
| The number of consecutive requests needed to set an endpoint as
healthy, default is `2`.
|
-| healthCheck.active.healthy.httpCodes | array of integer
| Good status codes list to check whether a probe is successful, only in
valid if the active health check type is `http` or `https`, default is `[200,
302]`.
|
-| healthCheck.active.healthy.interval | time duration in the form
"72h3m0.5s" | The probes sent interval (for healthy endpoints).
|
-| healthCheck.active.unhealthy | object
| The conditions to judge an endpoint is unhealthy.
|
-| healthCheck.active.unhealthy.httpFailures | int
| The number of consecutive http requests needed to set an endpoint as
unhealthy, only in valid if the active health check type is `http` or `https`,
default is `5`.
|
-| healthCheck.active.unhealthy.tcpFailures | int
| The number of consecutive tcp connections needed to set an endpoint as
unhealthy, only in valid if the active health check type is `tcp`, default is
`2`.
|
-| healthCheck.active.unhealthy.httpCodes | array of integer
| Bad status codes list to check whether a probe is failed, only in valid
if the active health check type is `http` or `https`, default is `[429, 404,
500, 501, 502, 503, 504, 505]`.
|
-| healthCheck.active.unhealthy.interval | time duration in the form
"72h3m0.5s" | The probes sent interval (for unhealthy endpoints).
|
-| healthCheck.passive | object
| passive health check configuration, which is an optional field.
|
-| healthCheck.passive.type | string
| health check type, can be `http`, `https` and `tcp`, default is `http`.
|
-| healthCheck.passive.healthy | object
| The conditions to judge an endpoint is healthy.
|
-| healthCheck.passive.healthy.successes | int
| The number of consecutive requests needed to set an endpoint as
healthy, default is `5`.
|
-| healthCheck.passive.healthy.httpCodes | array of integer
| Good status codes list to check whether a probe is successful, only in
valid if the active health check type is `http` or `https`, default is `[200,
201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306,
307, 308]`. |
-| healthCheck.passive.unhealthy | object
| The conditions to judge an endpoint is unhealthy.
|
-| healthCheck.passive.unhealthy.httpFailures | int
| The number of consecutive http requests needed to set an endpoint as
unhealthy, only in valid if the active health check type is `http` or `https`,
default is `5`.
|
-| healthCheck.passive.unhealthy.tcpFailures | int
| The number of consecutive tcp connections needed to set an endpoint as
unhealthy, only in valid if the active health check type is `tcp`, default is
`2`.
|
-| healthCheck.passive.unhealthy.httpCodes | array of integer
| Bad status codes list to check whether a probe is failed, only in valid
if the active health check type is `http` or `https`, default is `[429, 404,
500, 501, 502, 503, 504, 505]`.
|
-| portLevelSettings | array
| Settings for each individual port.
|
-| portLevelSettings.port | int
| The port number defined in the Kubernetes Service, must be a valid
port.
|
-| portLevelSettings.scheme | string
| same as `scheme` but takes higher precedence.
|
-| portLevelSettings.loadbalancer | object
| same as `loadbalancer` but takes higher precedence.
|
-| portLevelSettings.healthCheck | object
| same as `healthCheck` but takes higher precedence.
|
+| Field | Type | Description |
+|---------------|----------|----------------|
+| scheme | string | The protocol used to talk to the Service, can be
`http`, `grpc`, default is `http`. |
+| loadbalancer | object | The load balancing algorithm of this upstream
service |
+| loadbalancer.type | string | The load balancing type, can be `roundrobin`,
`ewma`, `least_conn`, `chash`, default is `roundrobin`. |
+| loadbalancer.hashOn | string | The hash value source scope, only take
effects if the `chash` algorithm is in use. Values can `vars`, `header`,
`vars_combinations`, `cookie` and `consumers`, default is `vars`. |
+| loadbalancer.key | string | The hash key, only in valid if the `chash`
algorithm is used.
+| retries | int | The retry count. |
+| timeout | object | The timeout settings. |
+| timeout.connect | time duration in the form "72h3m0.5s" | The connect
timeout. |
+| timeout.read | time duration in the form "72h3m0.5s" | The read timeout. |
+| timeout.send | time duration in the form "72h3m0.5s" | The send timeout. |
+| healthCheck | object | The health check parameters, see [Health
Check](https://github.com/apache/apisix/blob/master/doc/health-check.md) for
more details. |
+| healthCheck.active | object | active health check configuration, which is a
mandatory field. |
+| healthCheck.active.type | string | health check type, can be `http`, `https`
and `tcp`, default is `http`. |
+| healthCheck.active.timeout | time duration in the form "72h3m0.5s" | the
timeout settings for the probe, default is `1s`. |
+| healthCheck.active.concurrency | int | how many probes can be sent
simultaneously, default is `10`. |
+| healthCheck.active.host | string | host header in http probe request, only
in valid if the active health check type is `http` or `https`. |
+| healthCheck.active.port | int | target port to receive probes, it's
necessary to specify this field if the health check service exposes by
different port, note the port value here is the container port, not the service
port. |
+| healthCheck.active.httpPath | string | the HTTP URI path in http probe, only
in valid if the active health check type is `http` or `https`. |
+| healthCheck.active.strictTLS | boolean | whether to use the strict mode when
use TLS, only in valid if the active health check type is `https`, default is
`true`. |
+| healthCheck.active.requestHeaders | array of string | Extra HTTP requests
carried in the http probe, only in valid if the active health check type is
`http` or `https`. |
+| healthCheck.active.healthy | object | The conditions to judge an endpoint is
healthy. |
+| healthCheck.active.healthy.successes | int | The number of consecutive
requests needed to set an endpoint as healthy, default is `2`. |
+| healthCheck.active.healthy.httpCodes | array of integer | Good status codes
list to check whether a probe is successful, only in valid if the active health
check type is `http` or `https`, default is `[200, 302]`. |
+| healthCheck.active.healthy.interval | time duration in the form "72h3m0.5s"
| The probes sent interval (for healthy endpoints). |
+| healthCheck.active.unhealthy | object | The conditions to judge an endpoint
is unhealthy. |
+| healthCheck.active.unhealthy.httpFailures | int | The number of consecutive
http requests needed to set an endpoint as unhealthy, only in valid if the
active health check type is `http` or `https`, default is `5`. |
+| healthCheck.active.unhealthy.tcpFailures | int | The number of consecutive
tcp connections needed to set an endpoint as unhealthy, only in valid if the
active health check type is `tcp`, default is `2`. |
+| healthCheck.active.unhealthy.httpCodes | array of integer | Bad status codes
list to check whether a probe is failed, only in valid if the active health
check type is `http` or `https`, default is `[429, 404, 500, 501, 502, 503,
504, 505]`. |
+| healthCheck.active.unhealthy.interval | time duration in the form
"72h3m0.5s" | The probes sent interval (for unhealthy endpoints). |
+| healthCheck.passive | object | passive health check configuration, which is
an optional field. |
+| healthCheck.passive.type | string | health check type, can be `http`,
`https` and `tcp`, default is `http`. |
+| healthCheck.passive.healthy | object | The conditions to judge an endpoint
is healthy. |
+| healthCheck.passive.healthy.successes | int | The number of consecutive
requests needed to set an endpoint as healthy, default is `5`. |
+| healthCheck.passive.healthy.httpCodes | array of integer | Good status codes
list to check whether a probe is successful, only in valid if the active health
check type is `http` or `https`, default is `[200, 201, 202, 203, 204, 205,
206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308]`. |
+| healthCheck.passive.unhealthy | object | The conditions to judge an endpoint
is unhealthy. |
+| healthCheck.passive.unhealthy.httpFailures | int | The number of consecutive
http requests needed to set an endpoint as unhealthy, only in valid if the
active health check type is `http` or `https`, default is `5`. |
+| healthCheck.passive.unhealthy.tcpFailures | int | The number of consecutive
tcp connections needed to set an endpoint as unhealthy, only in valid if the
active health check type is `tcp`, default is `2`. |
+| healthCheck.passive.unhealthy.httpCodes | array of integer | Bad status
codes list to check whether a probe is failed, only in valid if the active
health check type is `http` or `https`, default is `[429, 404, 500, 501, 502,
503, 504, 505]`. |
+| portLevelSettings | array | Settings for each individual port. |
+| portLevelSettings.port | int | The port number defined in the Kubernetes
Service, must be a valid port. |
+| portLevelSettings.scheme | string | same as `scheme` but takes higher
precedence. |
+| portLevelSettings.loadbalancer | object | same as `loadbalancer` but takes
higher precedence. |
+| portLevelSettings.healthCheck | object | same as `healthCheck` but takes
higher precedence. |
## ApisixTls
@@ -355,11 +352,11 @@ spec:
namespace: cloud
```
-| Field | Type | Description
|
-| --------- | ------ |
------------------------------------------------------------------------------------------------------------
|
-| hosts | array | The domain list to identify which hosts (matched with
SNI) can use the TLS certificate stored in the Secret. |
-| secret | object | The definition of the related Secret object with
current ApisixTls object. |
-| name | string | The name of secret, the secret contains key and cert
for `TLS`. |
-| namespace | string | The namespace of secret , the secret contains key and
cert for `TLS`. |
+| Field | Type | Description |
+|---------------|----------|---------------------------------|
+| hosts | array | The domain list to identify which hosts (matched
with SNI) can use the TLS certificate stored in the Secret. |
+| secret | object | The definition of the related Secret object with
current ApisixTls object. |
+| name | string | The name of secret, the secret contains key and
cert for `TLS`. |
+| namespace | string | The namespace of secret , the secret contains key
and cert for `TLS`. |
[Back to top](#crd-types)
diff --git a/docs/en/latest/FAQ.md b/docs/en/latest/FAQ.md
index 99dc46a..cfe217e 100644
--- a/docs/en/latest/FAQ.md
+++ b/docs/en/latest/FAQ.md
@@ -1,3 +1,7 @@
+---
+title: FAQ
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +21,6 @@
#
-->
----
-
-id: faq
-title: FAQ
-
----
-
1. How to bind Service and Upstream?
All resource objects are uniquely determined by the namespace / name / port
combination Id. If the combined Id is the same, the `service` and `upstream`
will be considered as a binding relationship.
diff --git a/docs/en/latest/config.json b/docs/en/latest/config.json
index 5d20a42..7e14180 100644
--- a/docs/en/latest/config.json
+++ b/docs/en/latest/config.json
@@ -5,29 +5,29 @@
{
"type": "category",
"label": "Getting Started",
- "items": ["design", "crd-specification"]
+ "items": ["design", "CRD-specification"]
},
{
"type": "category",
"label": "Samples",
"items": [
- "samples",
- "samples-proxy-the-httpbin-service-with-ingress",
- "samples-proxy-the-httpbin-service"
+ "samples/index",
+ "samples/proxy-the-httpbin-service-with-ingress",
+ "samples/proxy-the-httpbin-service"
]
},
{
"type": "category",
"label": "Deployment",
"items": [
- "deployment-on-ack",
- "deployment-on-aws",
- "deployment-on-azure-aks",
- "deployment-on-gke",
- "deployment-on-k3s-rke",
- "deployment-on-kubeSphere",
- "deployment-on-minikube",
- "deployment-on-tke"
+ "deployments/ack",
+ "deployments/aws",
+ "deployments/azure",
+ "deployments/gke",
+ "deployments/k3s-rke",
+ "deployments/kubesphere",
+ "deployments/minikube",
+ "deployments/tke"
]
},
{
@@ -40,11 +40,11 @@
},
{
"type": "doc",
- "id": "contributing"
+ "id": "contribute"
},
{
"type": "doc",
- "id": "faq"
+ "id": "FAQ"
}
]
}
diff --git a/docs/en/latest/contribute.md b/docs/en/latest/contribute.md
index f1fdeff..fa861ee 100644
--- a/docs/en/latest/contribute.md
+++ b/docs/en/latest/contribute.md
@@ -1,3 +1,7 @@
+---
+title: Contributing to apisix-ingress-controller
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +21,6 @@
#
-->
----
-
-id: contributing
-title: Contributing to apisix-ingress-controller
-
----
-
Firstly, thanks for your interest in contributing! I hope that this will be a
pleasant first experience for you, and that you will return to continue
contributing.
@@ -34,13 +31,13 @@ Most of the contributions that we receive are code
contributions, but you can
also contribute to the documentation or simply report solid bugs
for us to fix.
-For new contributors, please take a look at issues with a tag called [Good
first
issue](https://github.com/apache/apisix-ingress-controller/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
or [Help
wanted](https://github.com/apache/apisix-ingress-controller/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).
+ For new contributors, please take a look at issues with a tag called [Good
first
issue](https://github.com/apache/apisix-ingress-controller/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
or [Help
wanted](https://github.com/apache/apisix-ingress-controller/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).
## How to report a bug
-- **Ensure the bug was not already reported** by searching on GitHub under
[Issues](https://github.com/apache/apisix-ingress-controller/issues).
+* **Ensure the bug was not already reported** by searching on GitHub under
[Issues](https://github.com/apache/apisix-ingress-controller/issues).
-- If you're unable to find an open issue addressing the problem, [open a new
one](https://github.com/apache/apisix-ingress-controller/issues/new). Be sure
to include a **title and clear description**, as much relevant information as
possible, and a **code sample** or an **executable test case** demonstrating
the expected behavior that is not occurring.
+* If you're unable to find an open issue addressing the problem, [open a new
one](https://github.com/apache/apisix-ingress-controller/issues/new). Be sure
to include a **title and clear description**, as much relevant information as
possible, and a **code sample** or an **executable test case** demonstrating
the expected behavior that is not occurring.
## How to add a new feature or change an existing one
@@ -48,7 +45,7 @@ Before making any significant changes, please [open an
issue](https://github.com
Once we've discussed your changes and you've got your code ready, make sure
that tests are passing and open your pull request. Your PR is most likely to be
accepted if it:
-- Update the README.md with details of changes to the interface.
-- Includes tests for new functionality.
-- References the original issue in the description, e.g. "Resolves #123".
-- Has a [good commit
message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
+* Update the README.md with details of changes to the interface.
+* Includes tests for new functionality.
+* References the original issue in the description, e.g. "Resolves #123".
+* Has a [good commit
message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
diff --git a/docs/en/latest/deployments/ack.md
b/docs/en/latest/deployments/ack.md
index b452c3f..6f57d8a 100644
--- a/docs/en/latest/deployments/ack.md
+++ b/docs/en/latest/deployments/ack.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on ACK
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,22 +21,15 @@
#
-->
----
-
-id: deployment-on-ack
-title: Install Ingress APISIX on ACK
-
----
-
This document explains how to install Ingress APISIX on [ali-cloud
ACK](https://www.aliyun.com/product/kubernetes).
## Prerequisites
-- Create an ACK Service on ali-cloud.
-- Download the kube config for your ACK, follow the
[introduction](https://www.alibabacloud.com/help/zh/doc-detail/86378.html).
-- Install [Helm](https://helm.sh/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, `kubectl` operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Create an ACK Service on ali-cloud.
+* Download the kube config for your ACK, follow the
[introduction](https://www.alibabacloud.com/help/zh/doc-detail/86378.html).
+* Install [Helm](https://helm.sh/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, `kubectl` operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/deployments/aws.md
b/docs/en/latest/deployments/aws.md
index 5b8c640..a0b10df 100644
--- a/docs/en/latest/deployments/aws.md
+++ b/docs/en/latest/deployments/aws.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on Amazon EKS
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,22 +21,15 @@
#
-->
----
-
-id: deployment-aws
-title: Install Ingress APISIX on Amazon EKS
-
----
-
This document explains how to install Ingress APISIX on [Amazon
EKS](https://amazonaws-china.com/eks/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc&eks-blogs.sort-by=item.additionalFields.createdDate&eks-blogs.sort-order=desc).
## Prerequisites
-- Create an EKS Service on AWS.
-- Install [Helm](https://helm.sh/).
-- Download the kube config for your EKS from [aws cli
interface](https://amazonaws-china.com/cli/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Create an EKS Service on AWS.
+* Install [Helm](https://helm.sh/).
+* Download the kube config for your EKS from [aws cli
interface](https://amazonaws-china.com/cli/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/deployments/azure.md
b/docs/en/latest/deployments/azure.md
index 0c67aff..11d12f3 100644
--- a/docs/en/latest/deployments/azure.md
+++ b/docs/en/latest/deployments/azure.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on Azure AKS
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,24 +21,15 @@
#
-->
----
-
-id: deployment-azure-aks
-title: Install Ingress APISIX on Azure AKS
-
----
-
-#
-
-This document explains how to install Ingress APISIX on [Auzre
AKS](<https://docs.microsoft.com/en-us/azure/aks/intro-kubernetes#:~:text=Azure%20Kubernetes%20Service%20(AKS)%20makes,managed%20Kubernetes%20cluster%20in%20Azure.&text=The%20Kubernetes%20masters%20are%20managed,clusters%2C%20not%20for%20the%20masters.>).
+This document explains how to install Ingress APISIX on [Auzre
AKS](https://docs.microsoft.com/en-us/azure/aks/intro-kubernetes#:~:text=Azure%20Kubernetes%20Service%20(AKS)%20makes,managed%20Kubernetes%20cluster%20in%20Azure.&text=The%20Kubernetes%20masters%20are%20managed,clusters%2C%20not%20for%20the%20masters.).
## Prerequisites
-- Create an Kubernetes Service on Azure.
-- Install [Azure
CLI](https://docs.microsoft.com/en-us/cli/azure/#:~:text=The%20Azure%20command%2Dline%20interface,with%20an%20emphasis%20on%20automation.)
and download the credentials by running `az aks get-credentials`.
-- Install [Helm](https://helm.sh/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Create an Kubernetes Service on Azure.
+* Install [Azure
CLI](https://docs.microsoft.com/en-us/cli/azure/#:~:text=The%20Azure%20command%2Dline%20interface,with%20an%20emphasis%20on%20automation.)
and download the credentials by running `az aks get-credentials`.
+* Install [Helm](https://helm.sh/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/deployments/gke.md
b/docs/en/latest/deployments/gke.md
index 6bde9b8..55730bd 100644
--- a/docs/en/latest/deployments/gke.md
+++ b/docs/en/latest/deployments/gke.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on Google Cloud GKE
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,22 +21,15 @@
#
-->
----
-
-id: deployment-on-gke
-title: Install Ingress APISIX on Google Cloud GKE
-
----
-
This document explains how to install Ingress APISIX on [Google Cloud
GKE](https://cloud.google.com/kubernetes-engine).
## Prerequisites
-- Create an Kubernetes Service on GKE.
-- Install [Google Cloud SDK](https://cloud.google.com/sdk) and get the
credentials or you can just use the [Cloud
Shell](https://cloud.google.com/shell).
-- Install [Helm](https://helm.sh/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Create an Kubernetes Service on GKE.
+* Install [Google Cloud SDK](https://cloud.google.com/sdk) and get the
credentials or you can just use the [Cloud
Shell](https://cloud.google.com/shell).
+* Install [Helm](https://helm.sh/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/deployments/k3s-rke.md
b/docs/en/latest/deployments/k3s-rke.md
index 28fea4e..c29cda0 100644
--- a/docs/en/latest/deployments/k3s-rke.md
+++ b/docs/en/latest/deployments/k3s-rke.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on K3S and Rancher RKE
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +21,6 @@
#
-->
----
-
-id: deployment-on-k3s-rke
-title: Install Ingress APISIX on K3S and Rancher RKE
-
----
-
This document explains how to install Ingress APISIX on [k3S](https://k3s.io/)
and [Rancher RKE](https://rancher.com/products/rke/).
K3S is a certified Kubernetes distribution built for IoT and Edge computing,
whilst [Apache APISIX](https://apisix.apache.org) is also good at IoT (See
[MQTT
plugin](https://github.com/apache/apisix/blob/master/doc/plugins/mqtt-proxy.md))
and runs well on ARM architecture.
@@ -31,10 +28,10 @@ It's a good choice to use Ingress APISIX as the north-south
API gateway in K3S.
## Prerequisites
-- Install [K3S](https://rancher.com/docs/k3s/latest/en/installation/) or
[Rancher RKE](https://rancher.com/docs/rke/latest/en/installation/).
-- Install [Helm](https://helm.sh/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Install [K3S](https://rancher.com/docs/k3s/latest/en/installation/) or
[Rancher RKE](https://rancher.com/docs/rke/latest/en/installation/).
+* Install [Helm](https://helm.sh/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
@@ -52,7 +49,7 @@ helm install apisix ./charts/apisix \
kubectl get service --namespace ingress-apisix
```
-_If you are using K3S, the default kubeconfig file is in /etc/rancher/k3s and
root permission may required._
+*If you are using K3S, the default kubeconfig file is in /etc/rancher/k3s and
root permission may required.*
Two Service resources were created, one is `apisix-gateway`, which processes
the real traffic; another is `apisix-admin`, which acts as the control plane to
process all the configuration changes.
@@ -76,7 +73,7 @@ helm install apisix-ingress-controller
./charts/apisix-ingress-controller \
--kubeconfig /etc/rancher/k3s/k3s.yaml
```
-_If you are using K3S, the default kubeconfig file is in /etc/rancher/k3s and
root permission may required._
+*If you are using K3S, the default kubeconfig file is in /etc/rancher/k3s and
root permission may required.*
The admin key used in abovementioned commands is the default one, if you
change the admin key configuration when you deployed APISIX, please remember to
change it here.
diff --git a/docs/en/latest/deployments/kubesphere.md
b/docs/en/latest/deployments/kubesphere.md
index 990b754..00df343 100644
--- a/docs/en/latest/deployments/kubesphere.md
+++ b/docs/en/latest/deployments/kubesphere.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on KubeSphere
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,23 +21,16 @@
#
-->
----
-
-id: deployment-on-kubeSphere
-title: Install Ingress APISIX on KubeSphere
-
----
-
This document explains how to install Ingress APISIX on
[KubeSphere](https://kubesphere.io/).
KubeSphere is a distributed operating system managing cloud native
applications with Kubernetes as its kernel, and provides plug-and-play
architecture for the seamless integration of third-party applications to boost
its ecosystem.
## Prerequisites
-- Install [KubeSphere](https://kubesphere.io/docs/quick-start/), you can
choose [All-in-one Installation on
Linux](https://kubesphere.io/docs/quick-start/all-in-one-on-linux/) or [Minimal
KubeSphere on
Kubernetes](https://kubesphere.io/docs/quick-start/minimal-kubesphere-on-k8s/).
-- Install [Helm](https://helm.sh/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations of this document
will be executed in namespace `ingress-apisix`.
+* Install [KubeSphere](https://kubesphere.io/docs/quick-start/), you can
choose [All-in-one Installation on
Linux](https://kubesphere.io/docs/quick-start/all-in-one-on-linux/) or [Minimal
KubeSphere on
Kubernetes](https://kubesphere.io/docs/quick-start/minimal-kubesphere-on-k8s/).
+* Install [Helm](https://helm.sh/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations of this document
will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/deployments/minikube.md
b/docs/en/latest/deployments/minikube.md
index 9b83a7f..7703914 100644
--- a/docs/en/latest/deployments/minikube.md
+++ b/docs/en/latest/deployments/minikube.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on Minikube
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,21 +21,14 @@
#
-->
----
-
-id: deployment-on-minikube
-title: Install Ingress APISIX on Minikube
-
----
-
This document explains how to install Ingress APISIX on
[Minikube](https://minikube.sigs.k8s.io/).
## Prerequisites
-- Install [Minikube](https://minikube.sigs.k8s.io/docs/start/).
-- Install [Helm](https://helm.sh/).
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Install [Minikube](https://minikube.sigs.k8s.io/docs/start/).
+* Install [Helm](https://helm.sh/).
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/deployments/tke.md
b/docs/en/latest/deployments/tke.md
index 39aa32b..b5b1c9c 100644
--- a/docs/en/latest/deployments/tke.md
+++ b/docs/en/latest/deployments/tke.md
@@ -1,3 +1,7 @@
+---
+title: Install Ingress APISIX on Tencent TKE
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,22 +21,15 @@
#
-->
----
-
-id: deployment-on-tke
-title: Install Ingress APISIX on Tencent TKE
-
----
-
This document explains how to install Ingress APISIX on [Tencent
TKE](https://cloud.tencent.com/product/tke).
## Prerequisites
-- Create a TKE Service on Tencent Cloud and make sure the API Server is
accessible from your workspace.
-- Install [Helm](https://helm.sh/).
-- Download the kube config for your TKE Console.
-- Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
-- Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
+* Create a TKE Service on Tencent Cloud and make sure the API Server is
accessible from your workspace.
+* Install [Helm](https://helm.sh/).
+* Download the kube config for your TKE Console.
+* Clone [Apache APISIX Charts](https://github.com/apache/apisix-helm-chart).
+* Make sure your target namespace exists, kubectl operations thorough this
document will be executed in namespace `ingress-apisix`.
## Install APISIX
diff --git a/docs/en/latest/design.md b/docs/en/latest/design.md
index c5f5eeb..533fff9 100644
--- a/docs/en/latest/design.md
+++ b/docs/en/latest/design.md
@@ -1,3 +1,7 @@
+---
+title: Ingress Controller
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +21,6 @@
#
-->
----
-
-id: ingress-controller-design
-title: Ingress Controller Design
-
----
-
Apache APISIX ingress for Kubernetes.
## Modules
@@ -67,8 +64,8 @@ Currently `apisix-ingress-controller` CRDs consist of 3
parts: ApisixRoute/Apisi
1. The most important part of the gateway is the route part, which is used to
define the distribution rules of the gateway traffics.
2. In order to facilitate understanding and configuration, the design
structure of `ApisixRoute` is basically similar to Kubernetes Ingress.
3. In the design of annotation, the structure of Kubernetes Ingress is used
for reference, but the internal implementation is based on the plug-in of
Apache APISIX.
-4. In the simplest case, you only need to define `ApisixRoute`, and the
Ingress controller will automatically add `ApisixUpstream`.
-5. `ApisixUpstream` can define some details on Apache APISIX upstream, such as
load balancing/health check, etc.
+5. In the simplest case, you only need to define `ApisixRoute`, and the
Ingress controller will automatically add `ApisixUpstream`.
+7. `ApisixUpstream` can define some details on Apache APISIX upstream, such as
load balancing/health check, etc.
## Monitoring CRDs
@@ -78,7 +75,7 @@ Currently `apisix-ingress-controller` CRDs consist of 3
parts: ApisixRoute/Apisi

-- Here is a flowchart that introduces the main logic of `ApisixRoute` and
other CRDs during synchronization.
+* Here is a flowchart that introduces the main logic of `ApisixRoute` and
other CRDs during synchronization.

@@ -131,7 +128,8 @@ metadata:
annotations:
k8s.apisix.apache.org/whitelist-source-range: 1.2.3.4,2.2.0.0/16
name: httpserver-route
-spec: ...
+spec:
+ ...
```
The black and white list here is implemented by the
[ip-restriction](https://github.com/apache/apisix/blob/master/doc/plugins/ip-restriction.md)
plugin.
diff --git a/docs/en/latest/development.md b/docs/en/latest/development.md
index 2c317b3..ddf109a 100644
--- a/docs/en/latest/development.md
+++ b/docs/en/latest/development.md
@@ -1,3 +1,7 @@
+---
+title: Developing for Apache APISIX Ingress Controller
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,26 +21,19 @@
#
-->
----
-
-id: development
-title: Developing for Apache APISIX Ingress Controller
-
----
-
This document explains how to get started with developing for Apache APISIX
Ingress controller.
## Prerequisites
-- Install [Go 1.13](https://golang.org/dl/) or later, and we use go module to
manage the go package dependencies.
-- Prepare an available Kubernetes cluster in your workstation, we recommend
you to use [Minikube](https://github.com/kubernetes/minikube).
-- [Install Apache APISIX in Kubernetes by Helm
Chart](https://github.com/apache/apisix-helm-chart).
+* Install [Go 1.13](https://golang.org/dl/) or later, and we use go module to
manage the go package dependencies.
+* Prepare an available Kubernetes cluster in your workstation, we recommend
you to use [Minikube](https://github.com/kubernetes/minikube).
+* [Install Apache APISIX in Kubernetes by Helm
Chart](https://github.com/apache/apisix-helm-chart).
## Fork and Clone
-- Fork the repository from
[apache/apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller)
to your own GitHub account.
-- Clone the forked repository to your workstation.
-- Run `go mod download` to download modules to local cache. By the way, if you
are a developer in China, we suggest you setting `GOPROXY` to
`https://goproxy.cn` to speed up the downloading.
+* Fork the repository from
[apache/apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller)
to your own GitHub account.
+* Clone the forked repository to your workstation.
+* Run `go mod download` to download modules to local cache. By the way, if you
are a developer in China, we suggest you setting `GOPROXY` to
`https://goproxy.cn` to speed up the downloading.
## Build
@@ -91,5 +88,5 @@ cd /path/to/apisix-ingress-controller
Something you need to pay attention to:
-- configuring of `--kubeconfig`, if you are using Minikube, the file path
should be `~/.kube/config`.
-- configuring of `--apisix-admin-key`, if you have changed the admin key in
Apache APISIX, also changing it here, if you disable the authentication if
Apache APISIX, just removing this option.
+* configuring of `--kubeconfig`, if you are using Minikube, the file path
should be `~/.kube/config`.
+* configuring of `--apisix-admin-key`, if you have changed the admin key in
Apache APISIX, also changing it here, if you disable the authentication if
Apache APISIX, just removing this option.
diff --git a/docs/en/latest/samples/index.md b/docs/en/latest/samples/index.md
index c984c1f..28dcbb5 100644
--- a/docs/en/latest/samples/index.md
+++ b/docs/en/latest/samples/index.md
@@ -1,3 +1,7 @@
+---
+title: Ingress APISIX Use Examples
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,14 +21,7 @@
#
-->
----
-
-id: samples
-title: Ingress APISIX Use Examples
-
----
-
This is an index page about use examples of Ingress APISIX. Read them if
you're trying to learn Ingress APISIX.
-- [Proxy the httpbin service](./proxy-the-httpbin-service.md).
-- [Proxy the httpbin service with the native
Ingress](./proxy-the-httpbin-service-with-ingress.md).
+* [Proxy the httpbin service](./proxy-the-httpbin-service.md).
+* [Proxy the httpbin service with the native
Ingress](./proxy-the-httpbin-service-with-ingress.md).
diff --git a/docs/en/latest/samples/proxy-the-httpbin-service-with-ingress.md
b/docs/en/latest/samples/proxy-the-httpbin-service-with-ingress.md
index 78d9db2..a6ee906 100644
--- a/docs/en/latest/samples/proxy-the-httpbin-service-with-ingress.md
+++ b/docs/en/latest/samples/proxy-the-httpbin-service-with-ingress.md
@@ -1,3 +1,7 @@
+---
+title: Proxy the httpbin service with Ingress
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,20 +21,13 @@
#
-->
----
-
-id: samples-proxy-the-httpbin-service-with-ingress
-title: Proxy the httpbin service with Ingress
-
----
-
This document explains how apisix-ingress-controller guides Apache APISIX
routes traffic to httpbin service correctly by the [Kubernetes
Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/).
## Prerequisites
-- Prepare an available Kubernetes cluster in your workstation, we recommend
you to use [Minikube](https://github.com/kubernetes/minikube).
-- [Install Apache APISIX in Kubernetes by Helm
Chart](https://github.com/apache/apisix-helm-chart).
-- Install
[apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller/blob/master/docs/install.md).
+* Prepare an available Kubernetes cluster in your workstation, we recommend
you to use [Minikube](https://github.com/kubernetes/minikube).
+* [Install Apache APISIX in Kubernetes by Helm
Chart](https://github.com/apache/apisix-helm-chart).
+* Install
[apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller/blob/master/docs/install.md).
## Deploy httpbin service
diff --git a/docs/en/latest/samples/proxy-the-httpbin-service.md
b/docs/en/latest/samples/proxy-the-httpbin-service.md
index 572e00f..9f60106 100644
--- a/docs/en/latest/samples/proxy-the-httpbin-service.md
+++ b/docs/en/latest/samples/proxy-the-httpbin-service.md
@@ -1,3 +1,7 @@
+---
+title: Proxy the httpbin service
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,20 +21,13 @@
#
-->
----
-
-id: samples-proxy-the-httpbin-service
-title: Proxy the httpbin service
-
----
-
This document explains how apisix-ingress-controller guides Apache APISIX
routes traffic to httpbin service correctly.
## Prerequisites
-- Prepare an available Kubernetes cluster in your workstation, we recommend
you to use [Minikube](https://github.com/kubernetes/minikube).
-- [Install Apache APISIX in Kubernetes by Helm
Chart](https://github.com/apache/apisix-helm-chart).
-- Install
[apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller/blob/master/docs/install.md).
+* Prepare an available Kubernetes cluster in your workstation, we recommend
you to use [Minikube](https://github.com/kubernetes/minikube).
+* [Install Apache APISIX in Kubernetes by Helm
Chart](https://github.com/apache/apisix-helm-chart).
+* Install
[apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller/blob/master/docs/install.md).
## Deploy httpbin service
@@ -55,13 +52,13 @@ metadata:
name: httpserver-route
spec:
rules:
- - host: local.httpbin.org
- http:
- paths:
- - backend:
- serviceName: httpbin
- servicePort: 80
- path: /*
+ - host: local.httpbin.org
+ http:
+ paths:
+ - backend:
+ serviceName: httpbin
+ servicePort: 80
+ path: /*
```
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.
diff --git a/docs/en/latest/usage.md b/docs/en/latest/usage.md
index 8d63d34..89a2edc 100644
--- a/docs/en/latest/usage.md
+++ b/docs/en/latest/usage.md
@@ -1,3 +1,7 @@
+---
+title: Usage of Ingress controller
+---
+
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +21,6 @@
#
-->
----
-
-id: usage
-title: Usage of Ingress controller
-
----
-
In this article, we will use ingress controller CRDs
(CustomResourceDefinition) to define routing rules against the admin api of
Apache APISIX.
## Scenes
@@ -53,11 +50,11 @@ metadata:
name: foo
spec:
ports:
- - port: 8080
- loadbalancer:
- type: chash
- hashOn: header
- key: hello
+ - port: 8080
+ loadbalancer:
+ type: chash
+ hashOn: header
+ key: hello
```
2. Define Route with `ApisixRoute`
@@ -69,13 +66,13 @@ metadata:
name: foo-route
spec:
rules:
- - host: test.apisix.apache.org
- http:
- paths:
- - backend:
- serviceName: foo
- servicePort: 8080
- path: /hello*
+ - host: test.apisix.apache.org
+ http:
+ paths:
+ - backend:
+ serviceName: foo
+ servicePort: 8080
+ path: /hello*
```
Tips: When defining `ApisixUpstream`, there is no need to define a specific
pod ip list, the ingress controller will do service discovery based on
namespace/name/port composite index.