I've a php application in a docker container deployed on my Kubernetes cluster. The application redirects from /
to another directory, let's say /example
(it's the same application, the application just uses another "root"-directory).
I'm using ambassador as ingress controller. Unfortunately, after the redirect ambassador says "no healthy upstream". Since I'm getting redirected, ambassador is able to find my application, but it cannot find my application anymore after the redirect. My ingress looks like:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
annotations:
kubernetes.io/ingress.class: ambassador
cert-manager.io/issuer: letsencrypt-prod
spec:
rules:
- host: sub.some-domain.tld
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myservice
port:
number: 80
tls:
- hosts:
- sub.some-domain.tld
secretName: acme-crt-secret
I expected that, when I get redirected from https://sub.some-domain.tld/ to https://sub.some-domain.tld/example, ambassador forwards the request to the ingress above, but obviously ambassador doesn't associate https://sub.some-domain.tld/exmaple with my ingress. Any ideas how I can solve this issue?
I was checking out the reason for this error since Friday and immediately after posting my question I finally found the error. The problem was that I had another ambassador mapping in another namespace. After deleting this mapping I'm finally able to serve the requests as expected.