Open martin-schulze-e2m opened 3 months ago
I have run into upstream doesn't exist. It will be created after ApisixRoute is created referencing it.
when kubectl apply
an upstream manifest. But once I created the service with route in it pointing to the upstream, I can apply the ApisixUpstream manifest without issue.
All I did was I made sure these correspond:
and that you create the ApisixRoute first and ApisixUpstream second.
I deleted the upstream and upgraded the helm chart that creates both route and upstream. Still the same error despite the route existing before the upstream.
I am also wondering how the matching should work, considering that the full upstream name contains the port number but the upstream CRD does not.
I reproduced this on a local test cluster with log_level: debug
in the ingress controller and got this additional message:
debug apisix/upstream.go:43 try to look up upstream {"name": "default_bitter_80_service"
However, as I said, the actual upstream name is default_bitter_80
, so no wonder there is no match.
Please note that I am relying on the bitnami chart version 3.3.9.
With this I also think that this is not a docs issue (though the docs around this could be improved) but an actual bug.
This used to work with APISIX 3.5.0 (from bitnami chart version 2.1.1)
Current State
I could find no documentation about how to do this. My understanding was, that the upstream should be named the same as the referenced service and be in the same namespace but I still get:
ApisixIngress synced failed, with error: upstream doesn't exist. It will be created after ApisixRoute is created referencing it.
For a concrete example:
I can see that this backend creates an upstream called
default_bitter_80
but the upstream config is not applied (as told by the error message). Similarly, I can't name the Upstreamdefault_bitter_80
because K8s forbids_
, so how am I supposed to get this to match?Update When I tried to use another name I get the error message
ApisixIngress synced failed, with error: service "bitter--80" not found
, so it seems the name was right but the upstream was still not matchedAPISIX Version: 3.9.1
Desired State
Describe how one can configure the autogenerated upstream from a backend route.