vga-diver opened a new issue, #2330:
URL: https://github.com/apache/apisix-ingress-controller/issues/2330
### 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):
--
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]