apache / apisix-ingress-controller

APISIX Ingress Controller for Kubernetes
https://apisix.apache.org/
Apache License 2.0
972 stars 337 forks source link

upstream not found warning in logs #2202

Open DGolubets opened 3 months ago

DGolubets commented 3 months ago

Issue description

I get lots of logs, like these:

2024-04-04T22:48:23+08:00   warn    apisix/cluster.go:1164  upstream not found  {"id": "1a9104d9", "url": "http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/1a9104d9", "cluster": "default"}
2024-04-04T22:48:24+08:00   warn    apisix/cluster.go:1164  upstream not found  {"id": "1a9104d9", "url": "http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/1a9104d9", "cluster": "default"}
2024-04-04T23:18:11+08:00   warn    apisix/cluster.go:1164  upstream not found  {"id": "1a9104d9", "url": "http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/1a9104d9", "cluster": "default"}

I'm trying to understand why.

I don't have any upstream resources in k8s, but I have routes. Those routes have created 2 upstreams which I can see in the dashboard, but they have different IDs to what I see in the logs.

So my question narrows down to: why does the ingress controller keep looking for the upstream "1a9104d9" and where does it get this id number from?

Environment

rkazak07 commented 3 months ago

I'm getting the same warnings too

rkazak07 commented 2 months ago

Hello, When I examine the debug mode warnings. I saw that the problem was from Rabbitmq.. It was fixed when I created these upstreams for rabbitmq. But I'm not sure how accurate this approach is. Why is it searching for rabbitmq in an apisix with 0 installations inside?

Revolyssup commented 2 months ago

Actually the endpoint controller in apisix ingress controller tries to look up an upstream resource corresponding to each service endpoint that is created. I am looking into this.

erSitzt commented 1 week ago

Hi any news on this @Revolyssup ? I just set up apisix and was wondering what upstreams it is referring to. What is that ID it is logging ? My apisix config is empty as of now, so where does the ID come from or is it generated for all endpoints found in the cluster ? Generating warnings for all endpoints which i might not want to handle in apisix seems a bit too much.