Is it possible to route ingress controller traffic to different services/deployments based upon the file type in the path? For example if the path was:
domain.com/directory/hello.html -> (Frontend Service)
domain.com/directory/hello.php -> (Backend Service)
The architecture I have designed looks like this:
Does this look suitable and is this possible, or is there a better way of achieving this?
My ingress controller looks like:
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: vote-ingress
namespace: default
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/vote-ingress
uid: 597158e6-a0ce-11e9-b3b1-00155d599803
resourceVersion: '268064'
generation: 1
creationTimestamp: '2019-07-07T15:46:13Z'
spec:
rules:
- host: localhost
http:
paths:
- path: /*.php
backend:
serviceName: website-backend
servicePort: 80
- path: /
backend:
serviceName: website-frontend
servicePort: 80
status:
loadBalancer:
ingress:
- hostname: localhost