Does the upstream support proxy pass a request to a long domain or to IP (not a service name) #4419
Replies: 8 comments
-
Hi @xuziheng1002 thanks for reporting! Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂 Cheers! |
Beta Was this translation helpful? Give feedback.
-
I did a test, that is not work... |
Beta Was this translation helpful? Give feedback.
-
Hi @xuziheng1002 |
Beta Was this translation helpful? Give feedback.
-
Please provide your YAML. Is this what you are looking for? https://github.com/nginxinc/kubernetes-ingress/tree/main/examples/custom-resources/externalname-services |
Beta Was this translation helpful? Give feedback.
-
following is my yaml: apiVersion: k8s.nginx.org/v1
kind: VirtualServer
metadata:
name: cafe
spec:
gunzip: true
host: cafe.example.com
upstreams:
- name: gateway-server
service: gateway-server.example.com
port: 80
routes:
- path: /api
action:
pass: gateway-server
- path: /
action:
return:
code: 200
type: text/html
body: '<!DOCTYPE html>
<html>
<body>hello world</body>
<div id="root" style="height: 100%;"></div>
</body>
</html>' My intention is to proxy_pass requests matching /api to the server gateway-server.example.com. The problem is |
Beta Was this translation helpful? Give feedback.
-
Hi @xuziheng1002 Currently if you set Can you describe your use case for this? It will help us better understand the need to configure the Ingress Controller this way. |
Beta Was this translation helpful? Give feedback.
-
Our frontend application aims to be the sole entry point for requests, so we need to use an ingress to proxy request to the backend servers. In a typical architecture, these proxy functions can be placed within an nginx pod behind a
Our frontend application aims to be the sole entry point for requests, so we need to use an ingress to proxy request to the backend servers. In a typical architecture, these proxy functions can be placed within an nginx pod behind a |
Beta Was this translation helpful? Give feedback.
-
Very sorry this discussion has gone this long without any followup. Currently a configuration like this is only possible with our ExternalNameService however please keep in mind this feature is currently only available in NGINX Plus. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
upstreams:
service: tea-svc.example.com
port: 80
do it works? like location.proxy_pass https://tea-svc.example.com/;
Alternatively, what configuration approach should I use to fulfill my requirements?
Beta Was this translation helpful? Give feedback.
All reactions