1 | initial version |
To configure haproxy-ingress to allow access to multiple backend services using the same port, depending on the respective hostname, follow these steps:
app: service1
and app: service2
respectively.apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-ingress
annotations:
ingress.kubernetes.io/ssl-redirect: "false" #Disable SSL redirect
spec:
rules:
- host: service1.example.com
http:
paths:
- path: /*
backend:
serviceName: service1
servicePort: 80
- host: service2.example.com
http:
paths:
- path: /*
backend:
serviceName: service2
servicePort: 80
This YAML file defines an Ingress resource that will expose two backend services named service1
and service2
, each at a different hostname. The haproxy-ingress controller will route requests to the appropriate backend service based on the hostname specified in the request.
In this way, you can configure haproxy-ingress to allow access to multiple backend services using the same port, depending on the respective hostname.