Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: Apisix upstream not found #2330

Open
vga-diver opened this issue Nov 29, 2024 · 0 comments
Open

request help: Apisix upstream not found #2330

vga-diver opened this issue Nov 29, 2024 · 0 comments

Comments

@vga-diver
Copy link

vga-diver commented Nov 29, 2024

Issue description

Hello,
I'm just starting using Apisix with Apisix Ingress Controller in our Kubernetes environment (in AWS).

We need to create the hybrid ingress controller which is able to forward traffic either to the k8s PODs or to EC2 instances outside or to some URL.

I noticed that it is possible to use apisix upstream for that purpose ( namespace: rc-apps).
I've tried the following configuration:

apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
  name: external-app-upstream
spec:
  externalNodes:
  - type: Domain
    name: ext-app.my.local

and getting the following error in ingest controller:

2024-11-29T21:15:47+08:00	error	apisix/apisix_upstream.go:376	failed to get upstream rc-apps_external-app-upstream: not found
2024-11-29T21:15:47+08:00	warn	apisix/apisix_upstream.go:489	sync ApisixUpstream failed, will retry	{"object": {"Type":1,"Object":{"Key":"rc-apps/external-app-upstream","OldObject":null,"GroupVersion":"apisix.apache.org/v2"},"OldObject":null,"Tombstone":null}, "error": "not found"}

I've tried to make different and try to configure upstream to external service:

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: custom-ingress-creators-support-backend
  namespace: rc-apps
spec:
  http:
    - name: api
      match:
        hosts:
        - new-app.my.local
        paths:
        - /api
      upstreams:
      - name: ext-upstream
---
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
  name: ext-upstream
  namespace: rc-apps
spec:
  externalNodes:
  - type: Service
    name: ext-service

and got the following errors:

2024-11-29T21:23:04+08:00	error	translation/apisix_route.go:238	failed to translate ApisixUpstream at Upstream[0]	{"error": "service \"ext-service\" not found", "apisix_upstream": "rc-apps/ext-upstream"}
2024-11-29T21:23:04+08:00	error	apisix/route.go:138	failed to create route: unexpected status code 400; error message: {"error_msg":"failed to fetch upstream info by upstream id [c89ce48d], response code: 404"}

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long): apache/apisix-ingress-controller:1.8.0
    apisix: apache/apisix:3.11.0-debian
  • your Kubernetes cluster version (output of kubectl version):
    Client Version: v1.30.2
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.29.10-eks-7f9249a
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant