Skip to content

Commit

Permalink
rename command line options and update doc. (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmssczy committed Feb 7, 2022
1 parent de52243 commit df8316a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cmd/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ Both json and yaml are supported as the configuration file format.
Run from command line options:
apisix-ingress-controller ingress --apisix-base-url http://apisix-service:9180/apisix/admin --kubeconfig /path/to/kubeconfig
apisix-ingress-controller ingress --default-apisix-cluster-base-url http://apisix-service:9180/apisix/admin --kubeconfig /path/to/kubeconfig
For Kubernetes cluster version older than v1.19.0, you should always set the --ingress-version option to networking/v1beta1:
apisix-ingress-controller ingress \
--apisix-base-url http://apisix-service:9180/apisix/admin \
--default-apisix-cluster-base-url http://apisix-service:9180/apisix/admin \
--kubeconfig /path/to/kubeconfig \
--ingress-version networking/v1beta1
If your Kubernetes cluster version is prior to v1.14+, only ingress.extensions/v1beta1 can be used.
apisix-ingress-controller ingress \
--apisix-base-url http://apisix-service:9180/apisix/admin \
--default-apisix-cluster-base-url http://apisix-service:9180/apisix/admin \
--kubeconfig /path/to/kubeconfig \
--ingress-version extensions/v1beta1
Expand Down
6 changes: 3 additions & 3 deletions docs/en/latest/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ cd /path/to/apisix-ingress-controller
--kubeconfig /path/to/kubeconfig \
--http-listen :8080 \
--log-output stderr \
--apisix-base-url http://192.168.65.2:31156/apisix/admin
--apisix-admin-key edd1c9f034335f136f87ad84b625c8f1
--default-apisix-cluster-base-url http://192.168.65.2:31156/apisix/admin
--default-apisix-cluster-admin-key edd1c9f034335f136f87ad84b625c8f1
```

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 `--default-apisix-cluster-admin-key`, if you have changed the admin key in Apache APISIX, also changing it here. If you have disabled the authentication in Apache APISIX, just removing this option.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ kubectl apply -f httpbin-ingress.yaml

## Test

Run curl call in one of Apache APISIX Pods to check whether the resource was delivered to it. Note you should replace the value of `--apisix-admin-key` to the real `admin_key` value in your Apache APISIX cluster.
Run curl call in one of Apache APISIX Pods to check whether the resource was delivered to it. Note you should replace the value of `--default-apisix-cluster-admin-key` to the real `admin_key` value in your Apache APISIX cluster.

```shell
kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/practices/proxy-the-httpbin-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ kubectl apply -f httpbin-route.yaml

## Test

Run curl call in one of Apache APISIX Pods to check whether the resource was delivered to it. Note you should replace the value of `--apisix-admin-key` to the real `admin_key` value in your Apache APISIX cluster.
Run curl call in one of Apache APISIX Pods to check whether the resource was delivered to it. Note you should replace the value of `--default-apisix-cluster-admin-key` to the real `admin_key` value in your Apache APISIX cluster.

```shell
kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
Expand Down

0 comments on commit df8316a

Please sign in to comment.