I’m trying to figure out how to setup path based routing in an Ingress config file to route to either Service A or Service B depending on the path that gets accessed through an elastic load balancer.
Ingress-Nginx docs reference: https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md#aws
I was able to successfully run the mandatory.yaml and service-l4.yaml file based on the docs. I see a load balancer was successfully created and I can access it.
I think I am missing some concept or something in my Ingress config file. I replaced the host for confidentiality. See below. Thanks in advance!
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: pullrequest-deployment
annotations:
# use the shared ingress-nginx
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: services.mycompany.com
http:
paths:
- path: /service-a
backend:
serviceName: service-a
servicePort: 80
- path: /service-b
backend:
serviceName: service-b
servicePort: 80