MirtoBusico edited a comment on issue #853:
URL:
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037349675
Hi @tao12345666333
Recreated the route using v2beta3
```
apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
name: productpage
spec:
http:
- name: rule1
match:
hosts:
- www2.m01.net
paths:
- /*
backends:
- serviceName: productpage
servicePort: 9080
resolveGranularity: service
```
Installed with
```
sysop@m01serv:~/software/apisisx$ kubectl -n bookinfo apply -f
productpage-ar.yaml
apisixroute.apisix.apache.org/productpage created
sysop@m01serv:~/software/apisisx$ date
sab 12 feb 2022, 18:43:37, CET
sysop@m01serv:~/software/apisisx$
```
The warning in the log still complains the **v2beta1** version
```
2022-02-12T17:42:36.559Z | [GIN] 2022/02/13 - 01:42:36 | 200 | 36.86µs |
127.0.0.6 | GET "/healthz"
2022-02-12T17:42:41.352Z | [GIN] 2022/02/13 - 01:42:41 | 200 | 41.27µs |
127.0.0.6 | GET "/healthz"
2022-02-12T17:42:46.558Z | [GIN] 2022/02/13 - 01:42:46 | 200 | 33.53µs |
127.0.0.6 | GET "/healthz"
2022-02-12T17:42:47.785Z | W0213 01:42:47.785053 1 warnings.go:70]
apisix.apache.org/v2beta1 ApisixRoute is deprecated; use
apisix.apache.org/v2beta3 ApisixRoute
2022-02-12T17:42:51.352Z | [GIN] 2022/02/13 - 01:42:51 | 200 | 29.54µs |
127.0.0.6 | GET "/healthz"
2022-02-12T17:42:56.559Z | [GIN] 2022/02/13 - 01:42:56 | 200 | 34.069µs |
127.0.0.6 | GET "/healthz"ù
...
2022-02-12T17:48:36.559Z | [GIN] 2022/02/13 - 01:48:36 | 200 | 38.13µs |
127.0.0.6 | GET "/healthz"
2022-02-12T17:48:41.118Z | W0213 01:48:41.118713 1 warnings.go:70]
apisix.apache.org/v2beta1 ApisixRoute is deprecated; use
apisix.apache.org/v2beta3 ApisixRoute
2022-02-12T17:48:41.352Z | [GIN] 2022/02/13 - 01:48:41 | 200 | 24.85µs |
127.0.0.6 | GET "/healthz"
```
The route correctly point to the Service address
<img width="1709" alt="v2beta3-route-defined"
src="https://user-images.githubusercontent.com/11090934/153722325-229bdfbc-a572-4932-acc8-8f16d3b95ad9.png">
Now I'll try some cluster restarts to see if the address changes
**UPDATE**
After the first restart the route address seems correct but the apisix
ingress controller started to signal errors:
```
2022-02-12T18:57:43.978Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:213 failed to list upstreams in APISIX: unexpected non-empty
object
2022-02-12T18:57:43.978Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:168 failed to sync cache {"cost_time": "8.04132023s",
"cluster": "default"}
2022-02-12T18:57:43.978Z | 2022-02-13T02:57:43+08:00 [31merror[0m
ingress/controller.go:436 failed to wait the default cluster to be ready:
unexpected non-empty object
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
apisix/cluster.go:158 syncing cache {"cluster": "default"}
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/route.go:119 failed to list routes: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/routes":
context canceled
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
apisix/cluster.go:370 syncing schema {"cluster": "default"}
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:208 failed to list routes in APISIX: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/routes":
context canceled
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:168 failed to sync cache {"cost_time": "80.459µs", "cluster":
"default"}
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/plugin.go:46 failed to list plugins' names: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugins/list":
context canceled
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:390 failed to list plugin names in APISIX: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugins/list":
context canceled
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:353 failed to sync schema: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugins/list":
context canceled
2022-02-12T18:57:43.979Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
ingress/controller.go:372 controller now is running as a candidate
{"namespace": "apisix", "pod": "apisix-ingress-controller-6846db58b8-lsv6g"}
2022-02-12T18:57:43.979Z | I0213 02:57:43.979480 1 leaderelection.go:248]
attempting to acquire leader lease apisix/ingress-apisix-leader...
2022-02-12T18:57:43.982Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
ingress/controller.go:320 LeaderElection {"message":
"apisix-ingress-controller-6846db58b8-lsv6g became leader", "event_type":
"Normal"}
2022-02-12T18:57:43.982Z | I0213 02:57:43.982706 1 leaderelection.go:258]
successfully acquired lease apisix/ingress-apisix-leader
2022-02-12T18:57:43.982Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
ingress/controller.go:409 controller tries to leading ... {"namespace":
"apisix", "pod": "apisix-ingress-controller-6846db58b8-lsv6g"}
2022-02-12T18:57:43.982Z | 2022-02-13T02:57:43+08:00 [33mwarn[0m
apisix/cluster.go:330 waiting cluster default to ready, it may takes a while
2022-02-12T18:57:43.983Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
apisix/cluster.go:370 syncing schema {"cluster": "default"}
2022-02-12T18:57:43.983Z | 2022-02-13T02:57:43+08:00 [34minfo[0m
apisix/cluster.go:158 syncing cache {"cluster": "default"}
2022-02-12T18:57:43.990Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/upstream.go:122 failed to convert upstream item {"url":
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams",
"upstream_key": "/apisix/upstreams/394532502988915297", "error": "unexpected
non-empty object"}
2022-02-12T18:57:43.990Z | 2022-02-13T02:57:43+08:00 [31merror[0m
apisix/cluster.go:213 failed to list upstreams in APISIX: unexpected non-empty
object
2022-02-12T18:57:46.000Z | 2022-02-13T02:57:46+08:00 [31merror[0m
apisix/upstream.go:122 failed to convert upstream item {"url":
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams",
"upstream_key": "/apisix/upstreams/394532502988915297", "error": "unexpected
non-empty object"}
2022-02-12T18:57:46.000Z | 2022-02-13T02:57:46+08:00 [31merror[0m
apisix/cluster.go:213 failed to list upstreams in APISIX: unexpected non-empty
object
2022-02-12T18:57:47.712Z | [GIN] 2022/02/13 - 02:57:47 | 200 | 33.75µs |
127.0.0.6 | GET "/healthz"
2022-02-12T18:57:48.014Z | 2022-02-13T02:57:48+08:00 [31merror[0m
apisix/upstream.go:122 failed to convert upstream item {"url":
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams",
"upstream_key": "/apisix/upstreams/394532502988915297", "error": "unexpected
non-empty object"}
2022-02-12T18:57:48.014Z | 2022-02-13T02:57:48+08:00 [31merror[0m
apisix/cluster.go:213 failed to list upstreams in APISIX: unexpected non-empty
object
2022-02-12T18:57:48.929Z | [GIN] 2022/02/13 - 02:57:48 | 200 | 35.1µs |
127.0.0.6 | GET "/healthz"
2022-02-12T18:57:50.026Z | 2022-02-13T02:57:50+08:00 [31merror[0m
apisix/upstream.go:122 failed to convert upstream item {"url":
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams",
"upstream_key": "/apisix/upstreams/394532502988915297", "error": "unexpected
non-empty object"}
2022-02-12T18:57:50.026Z | 2022-02-13T02:57:50+08:00 [31merror[0m
apisix/cluster.go:213 failed to list upstreams in APISIX: unexpected non-empty
object
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/upstream.go:122 failed to convert upstream item {"url":
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams",
"upstream_key": "/apisix/upstreams/394532502988915297", "error": "unexpected
non-empty object"}
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/cluster.go:213 failed to list upstreams in APISIX: unexpected non-empty
object
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/cluster.go:168 failed to sync cache {"cost_time": "8.05881925s",
"cluster": "default"}
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
ingress/controller.go:436 failed to wait the default cluster to be ready:
unexpected non-empty object
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
ingress/controller.go:372 controller now is running as a candidate
{"namespace": "apisix", "pod": "apisix-ingress-controller-6846db58b8-lsv6g"}
2022-02-12T18:57:52.042Z | I0213 02:57:52.042336 1 leaderelection.go:248]
attempting to acquire leader lease apisix/ingress-apisix-leader...
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
apisix/cluster.go:370 syncing schema {"cluster": "default"}
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
apisix/cluster.go:158 syncing cache {"cluster": "default"}
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/plugin.go:46 failed to list plugins' names: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugins/list":
context canceled
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/cluster.go:390 failed to list plugin names in APISIX: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugins/list":
context canceled
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/cluster.go:353 failed to sync schema: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugins/list":
context canceled
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/route.go:119 failed to list routes: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/routes":
context canceled
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/cluster.go:208 failed to list routes in APISIX: Get
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/routes":
context canceled
2022-02-12T18:57:52.042Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/cluster.go:168 failed to sync cache {"cost_time": "79.919µs", "cluster":
"default"}
2022-02-12T18:57:52.047Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
ingress/controller.go:320 LeaderElection {"message":
"apisix-ingress-controller-6846db58b8-lsv6g became leader", "event_type":
"Normal"}
2022-02-12T18:57:52.047Z | I0213 02:57:52.047247 1 leaderelection.go:258]
successfully acquired lease apisix/ingress-apisix-leader
2022-02-12T18:57:52.047Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
ingress/controller.go:409 controller tries to leading ... {"namespace":
"apisix", "pod": "apisix-ingress-controller-6846db58b8-lsv6g"}
2022-02-12T18:57:52.047Z | 2022-02-13T02:57:52+08:00 [33mwarn[0m
apisix/cluster.go:330 waiting cluster default to ready, it may takes a while
2022-02-12T18:57:52.047Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
apisix/cluster.go:158 syncing cache {"cluster": "default"}
2022-02-12T18:57:52.047Z | 2022-02-13T02:57:52+08:00 [34minfo[0m
apisix/cluster.go:370 syncing schema {"cluster": "default"}
2022-02-12T18:57:52.059Z | 2022-02-13T02:57:52+08:00 [31merror[0m
apisix/upstream.go:122 failed to convert upstream item {"url":
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams",
"upstream_key": "/apisix/upstreams/394532502988915297", "error": "unexpected
non-empty object"}
```
--
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]