superwjc opened a new issue #676:
URL: https://github.com/apache/apisix-ingress-controller/issues/676


   ### Issue description
   I haved installed apisix/apisix-dashboard/apisix-ingress-controller locally 
with helm, the charts tarballs were downloaded from 
[https://github.com/apache/apisix-helm-chart/releases](url).All the 
installation steps were ok, but after I created the httpbin service and apply 
the route rule provided by 
[http://apisix.apache.org/docs/ingress-controller/practices/proxy-the-httpbin-service](url),
 access to http://local.httpbin.org (ie, the test service) was redirected to 
apisix-dashboard, other services using apisixroute had the same problem.
   ### Environment
   
   * your apisix-ingress-controller version (output of 
`apisix-ingress-controller version --long`);
   `# ns="default"; kubectl -n "${ns}" exec -it "$(kubectl -n "${ns}" get pods 
| grep apisix-ingress-controller | awk '{print $1}')" -- 
/ingress-apisix/apisix-ingress-controller version --long
   Version: 1.2.0
   Git SHA: no-git-module
   Go Version: go1.13.8
   Building OS/Arch: linux/amd64
   Running OS/Arch: linux/amd64`
   * your Kubernetes cluster version (output of `kubectl version`);
   `# kubectl version
   Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", 
GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", 
BuildDate:"2021-08-11T18:16:05Z", GoVersion:"go1.16.7", Compiler:"gc", 
Platform:"linux/amd64"}
   Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", 
GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", 
BuildDate:"2021-08-11T18:10:22Z", GoVersion:"go1.16.7", Compiler:"gc", 
Platform:"linux/amd64"}`
   * if you run apisix-ingress-controller in Bare-metal environment, also show 
your OS version (`uname -a`).
   `# uname -a
   Linux k8s-master-1 3.10.0-1160.41.1.el7.x86_64 #1 SMP Tue Aug 31 14:52:47 
UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
   #
   # lsb_release -a
   LSB Version: 
:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
   Distributor ID:      CentOS
   Description: CentOS Linux release 7.9.2009 (Core)
   Release:     7.9.2009
   Codename:    Core`
   
   ### Minimal test code / Steps to reproduce the issue
   
   1. **version info**
   `# helm list
   NAME                         NAMESPACE       REVISION        UPDATED         
                        STATUS          CHART                           APP 
VERSION
   apisix                       default         1               2021-09-11 
17:37:54.433438923 +0800 CST deployed        apisix-0.4.0                    
2.7.0
   apisix-dashboard             default         1               2021-09-11 
17:47:04.809118632 +0800 CST deployed        apisix-dashboard-0.2.0          
2.8.0
   apisix-ingress-controller    default         1               2021-09-11 
17:47:26.952185607 +0800 CST deployed        apisix-ingress-controller-0.7.0 
1.2.0`
   2. **installation steps**
   `# ns="default"; helm install apisix apisix-0.4.0.tgz --set 
admin.allow.ipList="{0.0.0.0/0}" --set etcd.persistence.enabled=false -n 
"${ns}" --create-namespace
   
   # ns="default"; helm install apisix-dashboard apisix-dashboard-0.2.0.tgz 
--set service.type=NodePort -n "${ns}" --create-namespace
   
   # ns="default"; helm install apisix-ingress-controller 
apisix-ingress-controller-0.7.0.tgz --set config.logLevel=debug -n "${ns}" 
--create-namespace`
   All the settings were kept default, except the **etcd.persistence.enabled** 
for apisix, the **config.logLevel** for apisix-ingress-controller, and the 
**service.type** for apisix-dashboard.
   3. **all the status of pods and services related to apisix were ok**
   `# ns="default"; kubectl get pods,svc -n "${ns}"
   NAME                                            READY   STATUS    RESTARTS   
AGE
   pod/apisix-66cc75967c-pv29j                     1/1     Running   0          
59m
   pod/apisix-dashboard-786f74d8d5-qg6zv           1/1     Running   0          
50m
   pod/apisix-etcd-0                               1/1     Running   0          
59m
   pod/apisix-etcd-1                               1/1     Running   0          
59m
   pod/apisix-etcd-2                               1/1     Running   0          
59m
   pod/apisix-ingress-controller-698c9cc86-vrmfw   1/1     Running   0          
49m
   pod/httpbin                                     1/1     Running   0          
8m11s
   
   NAME                                TYPE        CLUSTER-IP      EXTERNAL-IP  
 PORT(S)             AGE
   service/apisix-admin                ClusterIP   10.100.2.176    <none>       
 9180/TCP            59m
   service/apisix-dashboard            NodePort    10.110.189.91   <none>       
 80:31803/TCP        50m
   service/apisix-etcd                 ClusterIP   10.102.89.66    <none>       
 2379/TCP,2380/TCP   59m
   service/apisix-etcd-headless        ClusterIP   None            <none>       
 2379/TCP,2380/TCP   59m
   service/apisix-gateway              NodePort    10.101.98.248   <none>       
 80:31370/TCP        59m
   service/apisix-ingress-controller   ClusterIP   10.98.45.181    <none>       
 80/TCP              49m
   service/httpbin                     ClusterIP   10.102.62.126   <none>       
 80/TCP              8m1s
   service/kubernetes                  ClusterIP   10.96.0.1       <none>       
 443/TCP             82m`
   4. **status of apisixroute was ok**
   `# ns="default"; kubectl get apisixroutes.apisix.apache.org -n "${ns}"
   Warning: apisix.apache.org/v1 ApisixRoute is deprecated
   NAME               HOSTS                   URIS     AGE
   httpserver-route   ["local.httpbin.org"]   ["/httpbin/*"]   24s
   #
   # ns="default"; kubectl describe apisixroutes.apisix.apache.org -n "${ns}" 
httpserver-route
   Warning: apisix.apache.org/v1 ApisixRoute is deprecated
   Name:         httpserver-route
   Namespace:    default
   Labels:       <none>
   Annotations:  <none>
   API Version:  apisix.apache.org/v1
   Kind:         ApisixRoute
   Metadata:
     Creation Timestamp:  2021-09-11T10:39:09Z
     Generation:          1
     Managed Fields:
       API Version:  apisix.apache.org/v2beta1
       Fields Type:  FieldsV1
       fieldsV1:
         f:metadata:
           f:annotations:
             .:
             f:kubectl.kubernetes.io/last-applied-configuration:
         f:spec:
           .:
           f:http:
       Manager:      kubectl-client-side-apply
       Operation:    Update
       Time:         2021-09-11T10:39:09Z
       API Version:  apisix.apache.org/v2beta1
       Fields Type:  FieldsV1
       fieldsV1:
         f:status:
           .:
           f:conditions:
       Manager:         apisix-ingress-controller
       Operation:       Update
       Time:            2021-09-11T10:39:10Z
     Resource Version:  20983
     UID:               74cb7729-496a-4bfa-bb09-6d82ce47da5d
   Spec:
     Http:
       Backend:
         Service Name:  httpbin
         Service Port:  80
       Match:
         Hosts:
           local.httpbin.org
         Paths:
           /httpbin/*
       Name:  rule1
   Status:
     Conditions:
       Last Transition Time:  2021-09-11T10:39:10Z
       Message:               Sync Successfully
       Reason:                ResourcesSynced
       Status:                True
       Type:                  ResourcesAvailable
   Events:
     Type    Reason           Age                From           Message
     ----    ------           ----               ----           -------
     Normal  ResourcesSynced  50s (x2 over 51s)  ApisixIngress  ApisixIngress 
synced successfully`
   5. **the pod for apisix-ingress-controller had no fatal errors**
   `# ns="default"; kubectl logs -n "${ns}" "$(kubectl -n "${ns}" get pods | 
grep apisix-ingress-controller | awk '{print $1}')" -f | grep -v 'healthz'
   2021-09-11T17:47:28+08:00    info    ingress/ingress.go:112  apisix ingress 
controller started
   2021-09-11T17:47:28+08:00    info    ingress/ingress.go:114  version:
   Version: 1.2.0
   Git SHA: no-git-module
   Go Version: go1.13.8
   Building OS/Arch: linux/amd64
   Running OS/Arch: linux/amd64
   
   2021-09-11T17:47:28+08:00    info    ingress/ingress.go:120  use 
configuration
   {
        "log_level": "info",
        "log_output": "stderr",
        "http_listen": ":8080",
        "enable_profiling": true,
        "kubernetes": {
                "kubeconfig": "",
                "resync_interval": "6h0m0s",
                "app_namespaces": [
                        ""
                ],
                "election_id": "ingress-apisix-leader",
                "ingress_class": "apisix",
                "ingress_version": "networking/v1",
                "watch_endpoint_slices": false,
                "apisix_route_version": "apisix.apache.org/v2beta1"
        },
        "apisix": {
                "default_cluster_name": "default",
                "default_cluster_base_url": 
"http://apisix-admin:9180/apisix/admin";,
                "default_cluster_admin_key": "edd1c9f034335f136f87ad84b625c8f1",
                "base_url": "http://apisix-admin:9180/apisix/admin";,
                "admin_key": "edd1c9f034335f136f87ad84b625c8f1"
        }
   }
   I0911 17:47:28.328713       1 leaderelection.go:243] attempting to acquire 
leader lease default/ingress-apisix-leader...
   2021-09-11T17:47:28+08:00    info    ingress/controller.go:285       
LeaderElection  {"message": "apisix-ingress-controller-698c9cc86-vrmfw became 
leader", "event_type": "Normal"}
   I0911 17:47:28.348433       1 leaderelection.go:253] successfully acquired 
lease default/ingress-apisix-leader
   2021-09-11T17:47:28+08:00    warn    ingress/controller.go:323       found a 
new leader apisix-ingress-controller-698c9cc86-vrmfw
   2021-09-11T17:47:28+08:00    info    ingress/controller.go:365       
controller tries to leading ... {"namespace": "default", "pod": 
"apisix-ingress-controller-698c9cc86-vrmfw"}
   2021-09-11T17:47:28+08:00    warn    apisix/cluster.go:301   waiting cluster 
default to ready, it may takes a while
   2021-09-11T17:47:28+08:00    info    apisix/cluster.go:340   syncing schema  
{"cluster": "default"}
   2021-09-11T17:47:28+08:00    info    apisix/cluster.go:152   syncing cache   
{"cluster": "default"}
   2021-09-11T17:47:28+08:00    info    apisix/cluster.go:156   cache synced    
{"cost_time": "53.237915ms", "cluster": "default"}
   2021-09-11T17:47:28+08:00    warn    apisix/cluster.go:312   cluster default 
now is ready, cost time 53.513481ms
   2021-09-11T17:47:28+08:00    info    ingress/controller.go:470       
controller now is running as leader     {"namespace": "default", "pod": 
"apisix-ingress-controller-698c9cc86-vrmfw"}
   2021-09-11T17:47:28+08:00    info    ingress/apisix_consumer.go:56   
ApisixConsumer controller started
   2021-09-11T17:47:28+08:00    info    ingress/endpoint.go:56  endpoints 
controller started
   2021-09-11T17:47:28+08:00    info    ingress/apisix_upstream.go:58   
ApisixUpstream controller started
   2021-09-11T17:47:28+08:00    info    ingress/ingress.go:58   ingress 
controller started
   2021-09-11T17:47:28+08:00    info    ingress/apisix_route.go:57      
ApisixRoute controller started
   2021-09-11T17:47:28+08:00    info    ingress/apisix_cluster_config.go:57     
ApisixClusterConfig controller started
   2021-09-11T17:47:28+08:00    info    ingress/pod.go:47       pod controller 
started
   2021-09-11T17:47:28+08:00    info    ingress/apisix_tls.go:58        
ApisixTls controller started
   2021-09-11T17:47:28+08:00    info    ingress/secret.go:62    secret 
controller started
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "kube-system_calico-typha_5473", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/e3f0f45e";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"kube-system_calico-typha_5473"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "kube-system_metrics-server_443", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/4a344633";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"kube-system_metrics-server_443"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-etcd-headless_2379", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/1be0297";, "cluster": "default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-etcd-headless_2379"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-etcd-headless_2380", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/fffaa6fc";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-etcd-headless_2380"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-admin_9180", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/283b4759";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-admin_9180"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-dashboard_80", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/f6a4deee";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-dashboard_80"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-ingress-controller_80", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/d517f3c0";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-ingress-controller_80"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_kubernetes_443", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/606b3be0";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_kubernetes_443"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "kube-system_kube-dns_53", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/f3118c88";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"kube-system_kube-dns_53"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "kube-system_kube-dns_53", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/f3118c88";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"kube-system_kube-dns_53"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "kube-system_kube-dns_9153", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/23ef4d0";, "cluster": "default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"kube-system_kube-dns_9153"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-gateway_80", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/2873d986";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-gateway_80"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-etcd_2379", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/82a413a4";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-etcd_2379"}
   2021-09-11T17:47:29+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-etcd_2380", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/7ce0b7cf";, "cluster": 
"default"}
   2021-09-11T17:47:29+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-etcd_2380"}
   2021-09-11T17:47:30+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-ingress-controller_80", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/d517f3c0";, "cluster": 
"default"}
   2021-09-11T17:47:30+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-ingress-controller_80"}
   2021-09-11T17:47:30+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_apisix-ingress-controller_80", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/d517f3c0";, "cluster": 
"default"}
   2021-09-11T17:47:30+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_apisix-ingress-controller_80"}
   2021-09-11T18:29:08+08:00    warn    apisix/upstream.go:70   upstream not 
found      {"name": "default_httpbin_80", "url": 
"http://apisix-admin:9180/apisix/admin/upstreams/5ce57b8e";, "cluster": 
"default"}
   2021-09-11T18:29:08+08:00    warn    ingress/controller.go:574       
upstream is not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin:9180/apisix/admin";, "upstream": 
"default_httpbin_80"}`
   6. **access to the httpbin service directly by clusterIP and port was ok**
   `# ns="default"; kubectl get svc -n "${ns}" | grep httpbin | awk '{print 
$3":"$5}' | awk -F'/' '{print $1}'
   10.102.62.126:80
   #
   # **curl 10.102.62.126:80**
   <!DOCTYPE html>
   <html lang="en">
   
   <head>
       <meta charset="UTF-8">
       <title>httpbin.org</title>
       <link 
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700"
           rel="stylesheet">
       <link rel="stylesheet" type="text/css" 
href="/flasgger_static/swagger-ui.css">
       <link rel="icon" type="image/png" href="/static/favicon.ico" 
sizes="64x64 32x32 16x16" />
       <style>
           html {
               box-sizing: border-box;
               overflow: -moz-scrollbars-vertical;
               overflow-y: scroll;
           }
   
           *,
           *:before,
           *:after {
               box-sizing: inherit;
           }
   
           body {
               margin: 0;
               background: #fafafa;
           }
       </style>
   </head>
   
   <body>
       <a href="https://github.com/requests/httpbin"; class="github-corner" 
aria-label="View source on Github">
           <svg width="80" height="80" viewBox="0 0 250 250" 
style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 
0;"
               aria-hidden="true">
               <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 
Z"></path>
               <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 
C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 
125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
                   fill="currentColor" style="transform-origin: 130px 106px;" 
class="octo-arm"></path>
               <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 
L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 
143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 
C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 
197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 
205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 
157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 
141.6,141.9 141.8,141.8 Z"
                   fill="currentColor" class="octo-body"></path>
           </svg>
       </a>
       <svg xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
style="position:absolute;width:0;height:0">
           <defs>
               <symbol viewBox="0 0 20 20" id="unlocked">
                   <path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 
2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 
.646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 
19h5.8c.549 0 1.428-.139 
1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 
8z"></path>
               </symbol>
   
               <symbol viewBox="0 0 20 20" id="locked">
                   <path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 
2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 
1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 
1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 
8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"
                   />
               </symbol>
   
               <symbol viewBox="0 0 20 20" id="close">
                   <path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 
11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 
0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 
1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 
.469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"
                   />
               </symbol>
   
               <symbol viewBox="0 0 20 20" id="large-arrow">
                   <path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 
0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 
7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"
                   />
               </symbol>
   
               <symbol viewBox="0 0 20 20" id="large-arrow-down">
                   <path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 
.969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 
0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"
                   />
               </symbol>
   
   
               <symbol viewBox="0 0 24 24" id="jump-to">
                   <path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 
13H21V7z" />
               </symbol>
   
               <symbol viewBox="0 0 24 24" id="expand">
                   <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z" />
               </symbol>
   
           </defs>
       </svg>
   
   
       <div id="swagger-ui">
           <div data-reactroot="" class="swagger-ui">
               <div>
                   <div class="information-container wrapper">
                       <section class="block col-12">
                           <div class="info">
                               <hgroup class="main">
                                   <h2 class="title">httpbin.org
                                       <small>
                                           <pre class="version">0.9.2</pre>
                                       </small>
                                   </h2>
                                   <pre class="base-url">[ Base URL: 
httpbin.org/ ]</pre>
                               </hgroup>
                               <div class="description">
                                   <div class="markdown">
                                       <p>A simple HTTP Request &amp; Response 
Service.
                                           <br>
                                           <br>
                                           <b>Run locally: </b>
                                           <code>$ docker run -p 80:80 
kennethreitz/httpbin</code>
                                       </p>
                                   </div>
                               </div>
                               <div>
                                   <div>
                                       <a href="https://kennethreitz.org"; 
target="_blank">the developer - Website</a>
                                   </div>
                                   <a href="mailto:[email protected]";>Send 
email to the developer</a>
                               </div>
                           </div>
                           <!-- ADDS THE LOADER SPINNER -->
                           <div class="loading-container">
                               <div class="loading"></div>
                           </div>
   
                       </section>
                   </div>
               </div>
           </div>
       </div>
   
   
       <div class='swagger-ui'>
           <div class="wrapper">
               <section class="clear">
                   <span style="float: right;">
                       [Powered by
                       <a target="_blank" 
href="https://github.com/rochacbruno/flasgger";>Flasgger</a>]
                       <br>
                   </span>
               </section>
           </div>
       </div>
   
   
   
       <script src="/flasgger_static/swagger-ui-bundle.js"> </script>
       <script src="/flasgger_static/swagger-ui-standalone-preset.js"> </script>
       <script src='/flasgger_static/lib/jquery.min.js' 
type='text/javascript'></script>
       <script>
   
           window.onload = function () {
   
   
               fetch("/spec.json")
                   .then(function (response) {
                       response.json()
                           .then(function (json) {
                               var current_protocol = 
window.location.protocol.slice(0, -1);
                               if (json.schemes[0] != current_protocol) {
                                   // Switches scheme to the current in use
                                   var other_protocol = json.schemes[0];
                                   json.schemes[0] = current_protocol;
                                   json.schemes[1] = other_protocol;
   
                               }
                               json.host = window.location.host;  // sets the 
current host
   
                               const ui = SwaggerUIBundle({
                                   spec: json,
                                   validatorUrl: null,
                                   dom_id: '#swagger-ui',
                                   deepLinking: true,
                                   jsonEditor: true,
                                   docExpansion: "none",
                                   apisSorter: "alpha",
                                   //operationsSorter: "alpha",
                                   presets: [
                                       SwaggerUIBundle.presets.apis,
                                       // yay ES6 modules ↘
                                       Array.isArray(SwaggerUIStandalonePreset) 
? SwaggerUIStandalonePreset : SwaggerUIStandalonePreset.default
                                   ],
                                   plugins: [
                                       SwaggerUIBundle.plugins.DownloadUrl
                                   ],
   
               // layout: "StandaloneLayout"  // uncomment to enable the green 
top header
           })
   
           window.ui = ui
   
           // uncomment to rename the top brand if layout is enabled
           // $(".topbar-wrapper .link 
span").replaceWith("<span>httpbin</span>");
           })
       })
   }
       </script>  <div class='swagger-ui'>
       <div class="wrapper">
           <section class="block col-12 block-desktop col-12-desktop">
               <div>
   
                   <h2>Other Utilities</h2>
   
                   <ul>
                       <li>
                           <a href="/forms/post">HTML form</a> that posts to 
/post /forms/post</li>
                   </ul>
   
                   <br />
                   <br />
               </div>
           </section>
       </div>
   </div>
   </body>
   
   </html>`
   7. **the upstream and the route created by the httpbin route rule were ok**
   `# ns="default"; kubectl get svc -n "${ns}" | grep 'apisix-admin' | awk 
'{print $3":"$5}' | awk -F'/' '{print $1}'
   10.100.2.176:9180
   [root@k8s-master-1 ~]#
   # **curl -fsSL 10.100.2.176:9180/apisix/admin/upstreams -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' | jq**
   {
     "node": {
       "dir": true,
       "key": "/apisix/upstreams",
       "nodes": [
         {
           "modifiedIndex": 13,
           "value": {
             "name": "default_httpbin_80",
             "update_time": 1631356750,
             "id": "5ce57b8e",
             "create_time": 1631356750,
             "hash_on": "vars",
             "type": "roundrobin",
             "pass_host": "pass",
             "desc": "Created by apisix-ingress-controller, DO NOT modify it 
manually",
             "labels": {
               "managed-by": "apisix-ingress-controller"
             },
             "scheme": "http",
             "nodes": [
               {
                 "port": 80,
                 "host": "10.244.196.4",
                 "weight": 100,
                 "priority": 0
               }
             ]
           },
           "createdIndex": 13,
           "key": "/apisix/upstreams/5ce57b8e"
         }
       ]
     },
     "count": 1,
     "action": "get"
   }
   #
   # **curl -fsSL 10.100.2.176:9180/apisix/admin/routes -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' | jq**
   {
     "node": {
       "dir": true,
       "key": "/apisix/routes",
       "nodes": [
         {
           "modifiedIndex": 15,
           "value": {
             "uris": [
               "/httpbin/*"
             ],
             "name": "default_httpserver-route_rule1",
             "hosts": [
               "local.httpbin.org"
             ],
             "update_time": 1631357738,
             "desc": "Created by apisix-ingress-controller, DO NOT modify it 
manually",
             "create_time": 1631356750,
             "priority": 0,
             "id": "add8e28c",
             "labels": {
               "managed-by": "apisix-ingress-controller"
             },
             "upstream_id": "5ce57b8e",
             "status": 1
           },
           "createdIndex": 14,
           "key": "/apisix/routes/add8e28c"
         }
       ]
     },
     "count": 1,
     "action": "get"
   }`
   8. **access to the apisix-dashboard was ok**
   `# ns="default"; echo http://"$(kubectl get nodes -n "${ns}" -o 
jsonpath="{.items[0].status.addresses[0].address}")":"$(kubectl get services -n 
"${ns}" apisix-dashboard -o jsonpath="{.spec.ports[0].nodePort}")"
   http://172.16.100.101:31803
   [root@k8s-master-2 ~]#
   [root@k8s-master-2 ~]# curl http://172.16.100.101:31803
   <!--
   MIT License
   
   Copyright (c) 2019 Alipay.inc
   
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:
   
   The above copyright notice and this permission notice shall be included in 
all
   copies or substantial portions of the Software.
   
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   SOFTWARE.
   --><!DOCTYPE html>
   <html lang="en">
     <head>
       <meta charset="UTF-8" />
       <meta http-equiv="X-UA-Compatible" content="IE=edge" />
       <meta
         name="viewport"
         content="width=device-width, initial-scale=1.0, maximum-scale=1.0, 
user-scalable=0"
       />
       <title>Apache APISIX Dashboard</title>
       <link rel="icon" href="/favicon.png" type="image/x-icon" />
       <link rel="stylesheet" href="/umi.ced15bae.css" />
       <script>
         window.routerBase = "/";
       </script>
       <script>
         //! umi version: 3.4.2
       </script>
     </head>
     <body>
       <noscript>Out-of-the-box mid-stage front/design solution!</noscript>
       <div id="root">
         <style>
           html,
           body,
           #root {
             height: 100%;
             margin: 0;
             padding: 0;
           }
           #root {
             background-repeat: no-repeat;
             background-size: 100% auto;
           }
           .page-loading-warp {
             display: flex;
             align-items: center;
             justify-content: center;
             padding: 98px;
           }
           .ant-spin {
             position: absolute;
             display: none;
             -webkit-box-sizing: border-box;
             box-sizing: border-box;
             margin: 0;
             padding: 0;
             color: rgba(0, 0, 0, 0.65);
             color: #1890ff;
             font-size: 14px;
             font-variant: tabular-nums;
             line-height: 1.5;
             text-align: center;
             vertical-align: middle;
             list-style: none;
             opacity: 0;
             -webkit-transition: -webkit-transform 0.3s
               cubic-bezier(0.78, 0.14, 0.15, 0.86);
             transition: -webkit-transform 0.3s
               cubic-bezier(0.78, 0.14, 0.15, 0.86);
             transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
             transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
               -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
             -webkit-font-feature-settings: "tnum";
             font-feature-settings: "tnum";
           }
   
           .ant-spin-spinning {
             position: static;
             display: inline-block;
             opacity: 1;
           }
   
           .ant-spin-dot {
             position: relative;
             display: inline-block;
             width: 20px;
             height: 20px;
             font-size: 20px;
           }
   
           .ant-spin-dot-item {
             position: absolute;
             display: block;
             width: 9px;
             height: 9px;
             background-color: #1890ff;
             border-radius: 100%;
             -webkit-transform: scale(0.75);
             -ms-transform: scale(0.75);
             transform: scale(0.75);
             -webkit-transform-origin: 50% 50%;
             -ms-transform-origin: 50% 50%;
             transform-origin: 50% 50%;
             opacity: 0.3;
             -webkit-animation: antSpinMove 1s infinite linear alternate;
             animation: antSpinMove 1s infinite linear alternate;
           }
   
           .ant-spin-dot-item:nth-child(1) {
             top: 0;
             left: 0;
           }
   
           .ant-spin-dot-item:nth-child(2) {
             top: 0;
             right: 0;
             -webkit-animation-delay: 0.4s;
             animation-delay: 0.4s;
           }
   
           .ant-spin-dot-item:nth-child(3) {
             right: 0;
             bottom: 0;
             -webkit-animation-delay: 0.8s;
             animation-delay: 0.8s;
           }
   
           .ant-spin-dot-item:nth-child(4) {
             bottom: 0;
             left: 0;
             -webkit-animation-delay: 1.2s;
             animation-delay: 1.2s;
           }
   
           .ant-spin-dot-spin {
             -webkit-transform: rotate(45deg);
             -ms-transform: rotate(45deg);
             transform: rotate(45deg);
             -webkit-animation: antRotate 1.2s infinite linear;
             animation: antRotate 1.2s infinite linear;
           }
   
           .ant-spin-lg .ant-spin-dot {
             width: 32px;
             height: 32px;
             font-size: 32px;
           }
   
           .ant-spin-lg .ant-spin-dot i {
             width: 14px;
             height: 14px;
           }
   
           @media all and (-ms-high-contrast: none), (-ms-high-contrast: 
active) {
             .ant-spin-blur {
               background: #fff;
               opacity: 0.5;
             }
           }
   
           @-webkit-keyframes antSpinMove {
             to {
               opacity: 1;
             }
           }
   
           @keyframes antSpinMove {
             to {
               opacity: 1;
             }
           }
   
           @-webkit-keyframes antRotate {
             to {
               -webkit-transform: rotate(405deg);
               transform: rotate(405deg);
             }
           }
   
           @keyframes antRotate {
             to {
               -webkit-transform: rotate(405deg);
               transform: rotate(405deg);
             }
           }
         </style>
         <div
           style="
             display: flex;
             justify-content: center;
             align-items: center;
             flex-direction: column;
             min-height: 420px;
             height: 100%;
           "
         >
           <div class="page-loading-warp">
             <div class="ant-spin ant-spin-lg ant-spin-spinning">
               <span class="ant-spin-dot ant-spin-dot-spin"
                 ><i class="ant-spin-dot-item"></i><i 
class="ant-spin-dot-item"></i
                 ><i class="ant-spin-dot-item"></i><i 
class="ant-spin-dot-item"></i
               ></span>
             </div>
           </div>
           <div
             style="display: flex; justify-content: center; align-items: center"
           >
             <img src="/favicon.png" width="32" style="margin-right: 8px" />
             Apache APISIX Dashboard
           </div>
         </div>
       </div>
   
       <script src="/umi.925e0f65.js"></script>
     </body>
   </html>`
   9. **access to the httpbin service by the apisixroute was NOT ok, still 
redirectd to the apisix-dashboard**
   `# ns="default"; echo http://"$(kubectl get nodes -n "${ns}" -o 
jsonpath="{.items[0].status.addresses[0].address}")":"$(kubectl get services -n 
"${ns}" apisix-dashboard -o jsonpath="{.spec.ports[0].nodePort}")"
   http://172.16.100.101:31803
   [root@k8s-master-2 ~]#
   [root@k8s-master-2 ~]# curl local.httpbin.org:31803/httpbin
   <!--
   MIT License
   
   Copyright (c) 2019 Alipay.inc
   
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:
   
   The above copyright notice and this permission notice shall be included in 
all
   copies or substantial portions of the Software.
   
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   SOFTWARE.
   --><!DOCTYPE html>
   <html lang="en">
     <head>
       <meta charset="UTF-8" />
       <meta http-equiv="X-UA-Compatible" content="IE=edge" />
       <meta
         name="viewport"
         content="width=device-width, initial-scale=1.0, maximum-scale=1.0, 
user-scalable=0"
       />
       <title>Apache APISIX Dashboard</title>
       <link rel="icon" href="/favicon.png" type="image/x-icon" />
       <link rel="stylesheet" href="/umi.ced15bae.css" />
       <script>
         window.routerBase = "/";
       </script>
       <script>
         //! umi version: 3.4.2
       </script>
     </head>
     <body>
       <noscript>Out-of-the-box mid-stage front/design solution!</noscript>
       <div id="root">
         <style>
           html,
           body,
           #root {
             height: 100%;
             margin: 0;
             padding: 0;
           }
           #root {
             background-repeat: no-repeat;
             background-size: 100% auto;
           }
           .page-loading-warp {
             display: flex;
             align-items: center;
             justify-content: center;
             padding: 98px;
           }
           .ant-spin {
             position: absolute;
             display: none;
             -webkit-box-sizing: border-box;
             box-sizing: border-box;
             margin: 0;
             padding: 0;
             color: rgba(0, 0, 0, 0.65);
             color: #1890ff;
             font-size: 14px;
             font-variant: tabular-nums;
             line-height: 1.5;
             text-align: center;
             vertical-align: middle;
             list-style: none;
             opacity: 0;
             -webkit-transition: -webkit-transform 0.3s
               cubic-bezier(0.78, 0.14, 0.15, 0.86);
             transition: -webkit-transform 0.3s
               cubic-bezier(0.78, 0.14, 0.15, 0.86);
             transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
             transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
               -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
             -webkit-font-feature-settings: "tnum";
             font-feature-settings: "tnum";
           }
   
           .ant-spin-spinning {
             position: static;
             display: inline-block;
             opacity: 1;
           }
   
           .ant-spin-dot {
             position: relative;
             display: inline-block;
             width: 20px;
             height: 20px;
             font-size: 20px;
           }
   
           .ant-spin-dot-item {
             position: absolute;
             display: block;
             width: 9px;
             height: 9px;
             background-color: #1890ff;
             border-radius: 100%;
             -webkit-transform: scale(0.75);
             -ms-transform: scale(0.75);
             transform: scale(0.75);
             -webkit-transform-origin: 50% 50%;
             -ms-transform-origin: 50% 50%;
             transform-origin: 50% 50%;
             opacity: 0.3;
             -webkit-animation: antSpinMove 1s infinite linear alternate;
             animation: antSpinMove 1s infinite linear alternate;
           }
   
           .ant-spin-dot-item:nth-child(1) {
             top: 0;
             left: 0;
           }
   
           .ant-spin-dot-item:nth-child(2) {
             top: 0;
             right: 0;
             -webkit-animation-delay: 0.4s;
             animation-delay: 0.4s;
           }
   
           .ant-spin-dot-item:nth-child(3) {
             right: 0;
             bottom: 0;
             -webkit-animation-delay: 0.8s;
             animation-delay: 0.8s;
           }
   
           .ant-spin-dot-item:nth-child(4) {
             bottom: 0;
             left: 0;
             -webkit-animation-delay: 1.2s;
             animation-delay: 1.2s;
           }
   
           .ant-spin-dot-spin {
             -webkit-transform: rotate(45deg);
             -ms-transform: rotate(45deg);
             transform: rotate(45deg);
             -webkit-animation: antRotate 1.2s infinite linear;
             animation: antRotate 1.2s infinite linear;
           }
   
           .ant-spin-lg .ant-spin-dot {
             width: 32px;
             height: 32px;
             font-size: 32px;
           }
   
           .ant-spin-lg .ant-spin-dot i {
             width: 14px;
             height: 14px;
           }
   
           @media all and (-ms-high-contrast: none), (-ms-high-contrast: 
active) {
             .ant-spin-blur {
               background: #fff;
               opacity: 0.5;
             }
           }
   
           @-webkit-keyframes antSpinMove {
             to {
               opacity: 1;
             }
           }
   
           @keyframes antSpinMove {
             to {
               opacity: 1;
             }
           }
   
           @-webkit-keyframes antRotate {
             to {
               -webkit-transform: rotate(405deg);
               transform: rotate(405deg);
             }
           }
   
           @keyframes antRotate {
             to {
               -webkit-transform: rotate(405deg);
               transform: rotate(405deg);
             }
           }
         </style>
         <div
           style="
             display: flex;
             justify-content: center;
             align-items: center;
             flex-direction: column;
             min-height: 420px;
             height: 100%;
           "
         >
           <div class="page-loading-warp">
             <div class="ant-spin ant-spin-lg ant-spin-spinning">
               <span class="ant-spin-dot ant-spin-dot-spin"
                 ><i class="ant-spin-dot-item"></i><i 
class="ant-spin-dot-item"></i
                 ><i class="ant-spin-dot-item"></i><i 
class="ant-spin-dot-item"></i
               ></span>
             </div>
           </div>
           <div
             style="display: flex; justify-content: center; align-items: center"
           >
             <img src="/favicon.png" width="32" style="margin-right: 8px" />
             Apache APISIX Dashboard
           </div>
         </div>
       </div>
   
       <script src="/umi.925e0f65.js"></script>
     </body>
   </html>`
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   described above, in step 9
   ### What's the expected result?
   access to any service of ClusterIP proxied by apisix, the behave should be 
the same as accessing to clusterIP:port service. As in this example, the 
service of ClusterIP "httpbin" is http://10.102.62.126:80, apisix-dashboard is 
http://172.16.100.101:31803, the route path is "/httpbin/*", the route host is 
"local.httpbin.org", so, access to http://local.httpbin.org:31803/httpbin 
should be the same as accessing http://10.102.62.126:80. 
   Am I right?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to