tokers commented on a change in pull request #250:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/250#discussion_r578060717



##########
File path: docs/samples/proxy-the-httpbin-service-with-ingress.md
##########
@@ -0,0 +1,126 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Proxy the httpbin service
+
+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).
+
+## Deploy httpbin service
+
+We use [kennethreitz/httpbin](https://hub.docker.com/r/kennethreitz/httpbin/) 
as the service image, See its overview page for details.
+
+Now, try to deploy it to your Kubernetes cluster:
+
+```shell
+kubectl run httpbin --image kennethreitz/httpbin --port 80
+kubectl expose pod httpbin --port 80
+```
+
+## Resource Delivery
+
+Here we create an Ingress resource.
+
+```yaml
+# httpbin-ingress.yaml
+# Note use apiVersion is networking.k8s.io/v1, so please make sure your
+# Kubernetes cluster version is v1.19.0 or higher.
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: httpserver-ingress
+spec:
+  # apisix-ingress-controller is only interested in Ingress
+  # resources with the matched ingressClass name, in our case,
+  # it's apisix.
+  ingressClassName: apisix
+  rules:
+  - host: local.httpbin.org
+    http:
+      paths:
+      - backend:
+          service:
+            name: httpbin
+            port:
+              number: 80
+        path: /
+        pathType: Prefix

Review comment:
       Well, it's the specification, the `pathType` can be :
   
   * `Exact`
   * `Prefix`
   * `ImplementationSpecific`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to