You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "sagardealcolab (via GitHub)" <gi...@apache.org> on 2025/08/04 14:18:29 UTC

[I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

sagardealcolab opened a new issue, #2504:
URL: https://github.com/apache/apisix-ingress-controller/issues/2504

   ### Current Behavior
   
   Hi, 
   
   I ran the below setup
   
   helm install apisix apisix/apisix \
     --namespace ingress-apisix \
     --create-namespace \
     --set etcd.enabled=true \
     --set ingress-controller.enabled=true \
     --set ingress-controller.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
     --set ingress-controller.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
     --set ingress-controller.config.apisix.serviceName=apisix-admin \
     --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
     --set ingressClass=apisix
   
   # s1-deployment.yaml
   `
   apiVersion: v1
   kind: Service
   metadata:
     name: s1
   spec:
     selector:
       app: s1
     ports:
       - port: 80
   ---
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: s1
   spec:
     replicas: 1
     selector:
       matchLabels:
         app: s1
     template:
       metadata:
         labels:
           app: s1
       spec:
         containers:
         - name: app
           image: hashicorp/http-echo
           args: ["-text", "response from s1"]
           ports:
           - containerPort: 5678
   `
   # s2-deployment.yaml
   `
   apiVersion: v1
   kind: Service
   metadata:
     name: s2
   spec:
     selector:
       app: s2
     ports:
       - port: 80
         targetPort: 5678
   ---
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: s2
   spec:
     replicas: 1
     selector:
       matchLabels:
         app: s2
     template:
       metadata:
         labels:
           app: s2
       spec:
         containers:
         - name: app
           image: hashicorp/http-echo
           args: ["-text", "response from s2"]
           ports:
           - containerPort: 5678
   `
   
   apisix-route-s1-s2.yaml
   `apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: route-s1-s2
   spec:
     ingressClassName: apisix
     http:
       - name: route-s1
         match:
           paths:
             - "/s1/*"
         backends:
           - serviceName: s1
             servicePort: 80
       - name: route-s2
         match:
           paths:
             - "/s2/*"
         backends:
           - serviceName: s2
             servicePort: 80
   `
   kubectl apply -f s1-deployment.yaml
   kubectl apply -f s2-deployment.yaml
   kubectl apply -f apisix-route-s1-s2.yaml
   
   After running these all i see routes are applied 
   k get apisixroute route-s1-s2 -o yaml
   `apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     annotations:
       kubectl.kubernetes.io/last-applied-configuration: |
         {"apiVersion":"apisix.apache.org/v2","kind":"ApisixRoute","metadata":{"annotations":{},"name":"route-s1-s2","namespace":"ingress-apisix"},"spec":{"http":[{"backends":[{"serviceName":"s1","servicePort":80}],"match":{"paths":["/s1/*"]},"name":"route-s1"},{"backends":[{"serviceName":"s2","servicePort":80}],"match":{"paths":["/s2/*"]},"name":"route-s2"}],"ingressClassName":"apisix"}}
     creationTimestamp: "2025-08-04T13:20:35Z"
     generation: 2
     name: route-s1-s2
     namespace: ingress-apisix
     resourceVersion: "32477"
     uid: f9491f1b-77e7-4ec2-8d3e-cc60fc6d88b3
   spec:
     http:
     - backends:
       - serviceName: s1
         servicePort: 80
       match:
         paths:
         - /s1/*
       name: route-s1
     - backends:
       - serviceName: s2
         servicePort: 80
       match:
         paths:
         - /s2/*
       name: route-s2
     ingressClassName: apisix
   status:
     conditions:
     - lastTransitionTime: "2025-08-04T14:02:10Z"
       message: ""
       observedGeneration: 2
       reason: Accepted
       status: "True"
       type: Accepted`
   
   
   
   When i tried to hit the apigatway it is always throwing error 
   ➜  ~ curl http://localhost:9080/s1
   
   {"error_msg":"404 Route Not Found"}
   ➜  ~ curl http://localhost:9080/s2
   
   {"error_msg":"404 Route Not Found"}
   
   
   after checking the routes on apisix/admin, it shows no routes
   
   `curl http://localhost:9180/apisix/admin/routes  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
   
   {"list":[],"total":0}`
   
   I checked thousands of pages and 2-3 chatbots, struggling to get this resolved from last 3 days but no luck
   
   
   
   ### Expected Behavior
   
   apisixroute should be synced and endpoint http://localhost:9080/s1 should redirect the request to the correct service.
   
   ### Error Logs
   
   ➜  ~ curl http://localhost:9080/s1
   
   {"error_msg":"404 Route Not Found"}
   
   ### Steps to Reproduce
   
   1. Install apisix with helm chart.
   2. create services in deployment
   3. create a ApisixRoute
   4. check the ingress controller logs
   
   ### Environment
   
   - APISIX Ingress controller version (run `apisix-ingress-controller version --long`)
   - Kubernetes cluster version (run `kubectl version`)
   - OS version if running APISIX Ingress controller in a bare-metal environment (run `uname -a`)
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

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


Re: [I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

Posted by "sagardealcolab (via GitHub)" <gi...@apache.org>.
sagardealcolab commented on issue #2504:
URL: https://github.com/apache/apisix-ingress-controller/issues/2504#issuecomment-3166633422

   Env
   ➜  k8s git:(main) k version
   Client Version: v1.32.2
   Kustomize Version: v5.5.0
   Server Version: v1.33.1
   ➜  k8s git:(main) helm version
   version.BuildInfo{Version:"v3.18.4", GitCommit:"d80839cf37d860c8aa9a0503fe463278f26cd5e2", GitTreeState:"clean", GoVersion:"go1.24.5"}
   
   Issue got resolved after installing GatewayProxy
   Nowhere in the document it is mentioned, really hidden in the below link
   
   https://github.com/apache/apisix-ingress-controller/blob/v2.0.0/docs/en/latest/upgrade-guide.md#controller-only-configuration-source


-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #2504:
URL: https://github.com/apache/apisix-ingress-controller/issues/2504#issuecomment-3199871651

   Our upgrade and installation documents have corresponding configuration instructions. I will close this issue first. If there is still a problem, please open it again.


-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #2504:
URL: https://github.com/apache/apisix-ingress-controller/issues/2504#issuecomment-3177431845

   Hi @sagardealcolab, I would like to know where your installation steps come from? Because in the latest [document](https://apisix.apache.org/docs/ingress-controller/install/) installation steps, there are settings to create gatewayProxy.


-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #2504:
URL: https://github.com/apache/apisix-ingress-controller/issues/2504#issuecomment-3153055117

   Hi @sagardealcolab, please add the Environment info.


-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #2504:
URL: https://github.com/apache/apisix-ingress-controller/issues/2504#issuecomment-3166935461

   Thank you for pointing this out. We will optimize the relevant documentation.


-- 
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: notifications-unsubscribe@apisix.apache.org

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


Re: [I] bug: ApisixRoutes are not synced to apisix ingress controller / admin [apisix-ingress-controller]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop closed issue #2504: bug: ApisixRoutes are not synced to apisix ingress controller / admin
URL: https://github.com/apache/apisix-ingress-controller/issues/2504


-- 
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: notifications-unsubscribe@apisix.apache.org

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