Score:0

How to route azure application gateway to a service in different namespace?

ck flag

My ingress for azure application gateway, so that it will use istio gateway internally.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: server-ingress
  namespace: productnamespace
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
    appgw.ingress.kubernetes.io/backend-protocol: "http"
    appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
    cert-manager.io/cluster-issuer: letsencrypt-prod
    appgw.ingress.kubernetes.io/health-probe-status-codes: "200-399, 401, 403"
spec:
  tls:
  - hosts:
    - dev1.myproductnamespace.com
    secretName: productnamespace-cert-secret
  rules:
  - host: dev1.myproductnamespace.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          namespace: istio-system
          service:
            name: istio-gateway
            port:
              number: 80

istio-gateway is in istio-system namespace, And above ingress is in productnamespace. When I did port-forwarding for istio-gateway, it is able to access the product pages. So, istio gateway is good.

But route from azure app gateway ingress to istio-gateway ingress is failing.

In the events, it shows as below.

It is trying to search for istio-gateway in productnamespace instead of istio-system and failing.

different namespace event

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.