I've setup the haproxy with kubernetes ingress controller https://github.com/nginxinc/kubernetes-ingress and everything works fine when I try to resolve the root path http://example.com, but if I try to resolve any subpath http://example.com/blue I always get not found 404. Please any idea why the sub-paths are not working? Below my haproxy config and ingress resource. Thanks.
haproxy.cfg
frontend http_front
bind *:80
stats uri /haproxy?stats
default_backend http_back
backend http_back
balance roundrobin
server kube 192.168.1.10:80
ingress-resource.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress-resource
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: example.com
http:
paths:
- path: /blue
backend:
serviceName: nginx-deploy-blue
servicePort: 80