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.
Prerequisites#
- Prepare an available Kubernetes cluster in your workstation, we recommend you to use Minikube.
- Install Apache APISIX in Kubernetes by Helm Chart.
- Install apisix-ingress-controller.
Deploy httpbin service#
We use kennethreitz/httpbin as the service image, See its overview page for details.
Now, try to deploy it to your Kubernetes cluster:
Resource Delivery#
Here we create an Ingress resource.
The YAML snippet shows a simple Ingress configuration, which tells Apache APISIX to route all requests with Host local.httpbin.org to the httpbin service.
Now try to create it.
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.
And request to Apache APISIX to verify the route.
In case of success, you'll see a JSON string which contains all requests headers carried by curl like: