简体   繁体   中英

Azure Application Gateway Ingress Controller not reaching Service(CLusterIP)

Here I have explained the scenario. I can reach a clusterIP using nginx ingress But I can't reach the same service using Azure Application Gateway Ingress. Bellow annotation is not helping me

appgw.ingress.kubernetes.io/rewrite-target: /

Any Idea?

Make sure you add below annotations to example-ingress.

appgw.ingress.kubernetes.io/use-private-ip: "false"
kubernetes.io/ingress.class: azure/application-gateway

You can see the full list and examples here .

You were using wrong annotation. I have updated your ingress with correct annotation:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
    appgw.ingress.kubernetes.io/backend-path-prefix: "/"
spec:
  rules:
  - http:
      paths:
        - path: /apple/*
          pathType: Prefix
          backend:
            service:
                name: apple-service
                port:
                    number: 5678

Checkout all the AGIC annotations here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM