This document explains how to get started with developing for Apache APISIX Ingress controller.
- Install Go 1.13 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 Kind.
- Install Apache APISIX in Kubernetes by Helm Chart.
- Fork the repository from apache/apisix-ingress-controller to your own GitHub account.
- Clone the fork repository to your workstation.
go mod downloadto download modules to local cache. By the way, if you are a developer in China, we suggest you setting
https://goproxy.cnto speed up the downloading.
Note the running of e2e cases is somewhat slow, so please be patient.
See here to learn how to just run partial e2e cases.
make build-image IMAGE_TAG=a.b.c
Note: The Dockerfile in this repository is only for development, not for release.
If you're coding for apisix-ingress-controller and adding some e2e test cases to verify your changes, you should push the images to the image registry that your Kubernetes cluster can access, if you're using Kind, just run the following command:
We assume all prerequisites above mentioned are met, what's more, since we want to run apisix-ingress-controller in bare-metal environment, please make sure both the proxy service and admin api service of Apache APISIX are exposed outside of the Kubernetes cluster, e.g. configuring them as NodePort services.
Let's assume the Admin API service address of Apache APISIX is
http://192.168.65.2:31156. Next launch the ingress-apisix-controller by the following command.
./apisix-ingress-controller ingress \
--kubeconfig /path/to/kubeconfig \
--http-listen :8080 \
--log-output stderr \
Something you need to pay attention to:
- configuring of
--kubeconfig, if you are using Minikube, the file path should be
- 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.