You have several APIs using the same port with unique base paths configured and would like to configure a single ingress resource object to serve all requests.
$ helm -n gateway upgrade -i --create-namespace --wait ingress flex-gateway/flex-gateway \ --set-file registration.content=registration.yaml \ --set gateway.mode=connected --set service.type=ClusterIP --set service.http.port=8081
--- Implementation URI: https://<upstream address>:443 Base path: /api1 Port: 8081 --- Implementation URI: https://<upstream address>:443 Base path: /api2 Port: 8081 ---
cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: ingress-resource
namespace: gateway
spec:
rules:
- host: example.com
http:
paths:
- backend:
service:
name: ingress
port:
number: 8081
path: /
pathType: Prefix
EOF
$ curl http://<ingressControllerIP>/api1/users/1 -H "Host: example.com"
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"zipcode": "92998-3874",
"geo": {
"lat": "-37.3159",
"lng": "81.1496"
}
},
"phone": "1-770-736-8031 x56442",
"website": "hildegard.org",
"company": {
"name": "Romaguera-Crona",
"catchPhrase": "Multi-layered client-server neural-net",
"bs": "harness real-time e-markets"
}
$ curl http://<ingressControllerIP>/api2/users/1 -H "Host: example.com"
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"zipcode": "92998-3874",
"geo": {
"lat": "-37.3159",
"lng": "81.1496"
}
},
"phone": "1-770-736-8031 x56442",
"website": "hildegard.org",
"company": {
"name": "Romaguera-Crona",
"catchPhrase": "Multi-layered client-server neural-net",
"bs": "harness real-time e-markets"
}
001117079

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.