help request: The route was not successfully created.
Description
I create an ingress resource:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: apisix-admin
namespace: apisix
spec:
ingressClassName: apisix
rules:
- host: pdx-apisix-test.bblops.com
http:
paths:
- backend:
service:
name: apisix-admin
port:
number: 9180
path: /
pathType: Prefix
the APISIX route does not create successfully, I check the adc-server DEBUG log:
{"level":"debug","local":{"hosts":["pdx-apisix-test.bblops.com"],"labels":{"k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix","manager-by":"apisix-ingress-controller"},"name":"apisix_apisix-admin_0-0","upstream":{"labels":{"managed-by":"apisix-ingress-controller"},"nodes":[{"host":"10.163.32.28","port":9180,"weight":1}],"type":"roundrobin"}},"message":"Diff main resources","originalLocal":{"hosts":["pdx-apisix-test.bblops.com"],"labels":{"k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix","manager-by":"apisix-ingress-controller"},"name":"apisix_apisix-admin_0-0","routes":[{"description":"Created by apisix-ingress-controller, DO NOT modify it manually","labels":{"k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix","manager-by":"apisix-ingress-controller"},"name":"apisix_apisix-admin_0-0","uris":["/","/*"]}],"upstream":{"labels":{"managed-by":"apisix-ingress-controller"},"nodes":[{"host":"10.163.32.28","port":9180,"weight":1}],"type":"roundrobin"}},"realLocal":{"hosts":["pdx-apisix-test.bblops.com"],"labels":{"k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix","manager-by":"apisix-ingress-controller"},"name":"apisix_apisix-admin_0-0","upstream":{"labels":{"managed-by":"apisix-ingress-controller"},"nodes":[{"host":"10.163.32.28","port":9180,"weight":1}],"type":"roundrobin"}},"realRemote":{"hosts":["pdx-apisix-test.bblops.com"],"labels":{"k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix","manager-by":"apisix-ingress-controller"},"name":"apisix_apisix-admin_0-0","upstream":{"labels":{"managed-by":"apisix-ingress-controller"},"nodes":[{"host":"10.163.32.28","port":9180,"weight":1}],"type":"roundrobin"}},"remote":{"hosts":["pdx-apisix-test.bblops.com"],"labels":{"k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix","manager-by":"apisix-ingress-controller"},"name":"apisix_apisix-admin_0-0","upstream":{"labels":{"managed-by":"apisix-ingress-controller"},"nodes":[{"host":"10.163.32.28","port":9180,"weight":1}],"type":"roundrobin"}},"requestId":"d0680270-4897-4b37-a48b-3e52ad74edb6","timestamp":"2026-02-06T02:26:09.186Z","transactionId":"985f00fd-636d-4386-b46f-010195379e1b"}
the APISIX service created:
# curl -H "X-API-KEY: xxx" http://apisix-admin:9180/apisix/admin/services
{"total":1,"list":[{"key":"/apisix/services/e97dfc7b","value":{"labels":{"manager-by":"apisix-ingress-controller","k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix"},"create_time":1770278541,"update_time":1770278541,"id":"e97dfc7b","hosts":["pdx-apisix-test.bblops.com"],"name":"apisix_apisix-admin_0-0","upstream_id":"e97dfc7b"},"createdIndex":35,"modifiedIndex":35}]}
the APISIX upstream created:
# curl -H "X-API-KEY: xxx" http://apisix-admin:9180/apisix/admin/upstreams
{"total":1,"list":[{"key":"/apisix/upstreams/e97dfc7b","value":{"labels":{"managed-by":"apisix-ingress-controller"},"create_time":1770278541,"update_time":1770295935,"id":"e97dfc7b","type":"roundrobin","name":"apisix_apisix-admin_0-0","nodes":[{"port":9180,"host":"10.163.32.28","weight":1}]},"createdIndex":34,"modifiedIndex":80}]}
But the route does not create, I do not know the reason:
# curl -H "X-API-KEY: xxxx" http://apisix-admin:9180/apisix/admin/routes
{"total":1,"list":[{"key":"/apisix/routes/e97dfc7b","value":{"labels":{"manager-by":"apisix-ingress-controller","k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix"},"create_time":1770278541,"update_time":1770278541,"name":"apisix_apisix-admin_0-0","service_id":"e97dfc7b","uris":["/","/*"],"status":1,"id":"e97dfc7b","desc":"Created by apisix-ingress-controller, DO NOT modify it manually"},"createdIndex":36,"modifiedIndex":36}]}
Environment
- APISIX version (run
apisix version): 3.14.1 - apisix-ingress-controller version: 2.0.1
- adc-server version: 0.23.1
Hi @FIREcup, when calling the admin API to query routes, data is returned. What do you mean by “the route was not created successfully”?
Hi @FIREcup, when calling the admin API to query routes, data is returned. What do you mean by “the route was not created successfully”?
I need to correct that — the Ingress resource was indeed created. I encountered another issue: I also created an ApisixRoute resource, but it seems that this route resource was not created.
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: health-check
namespace: apisix
spec:
http:
- name: health
match:
paths:
- /healthz
hosts:
- health.bblops.com
backends:
- serviceName: apisix-gateway
servicePort: 80
# curl -H "X-API-KEY: xxxxx" http://apisix-admin:9180/apisix/admin/routes
{"total":1,"list":[{"key":"/apisix/routes/e97dfc7b","value":{"labels":{"manager-by":"apisix-ingress-controller","k8s/controller-name":"apisix.apache.org/apisix-ingress-controller","k8s/kind":"Ingress","k8s/name":"apisix-admin","k8s/namespace":"apisix"},"create_time":1770278541,"update_time":1770278541,"name":"apisix_apisix-admin_0-0","service_id":"e97dfc7b","uris":["/","/*"],"status":1,"id":"e97dfc7b","desc":"Created by apisix-ingress-controller, DO NOT modify it manually"},"createdIndex":36,"modifiedIndex":36}]}
On the official documentation for apisix-ingress-controller 2.0, I couldn't find the documentation for ApisixRoute. I'm not sure if support for ApisixRoute has been adjusted starting from version 2.0.