Azure / application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
https://azure.github.io/application-gateway-kubernetes-ingress
MIT License
678 stars 422 forks source link

Issue with BrownField Deployment (backendPool, HttpSetting and HealthProbe) #676

Open nreddipalle opened 4 years ago

nreddipalle commented 4 years ago

Describe the bug Existing AppGateway configuration is not correct after AGIC setup is completed.

This is the Ingress setup.. `apiVersion: extensions/v1beta1 kind: Ingress metadata: name: tasks-dev-ingress namespace: tasks-dev annotations: kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"

spec: tls:

Let me know if any additional info is required. Thanks.

akshaysngupta commented 4 years ago

@nreddipalle You have to specify a ingress rule for path /. That is used to set the default backend pool and default backend http settting in Path-based rule.

Try modify your existing ingress yaml by changing /tasks/ -> /

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: tasks-dev-ingress
  namespace: tasks-dev
annotations:
  kubernetes.io/ingress.class: azure/application-gateway
  appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
spec:
  tls:
    - hosts:
      - senseimsvctasksweu-dev.senseilabs.com
      secretName: sensei-ingress-tls
  rules:
  - host: senseimsvctasksweu-dev.senseilabs.com
    http:
    paths:
      path: /
      backend:
        serviceName: web-ui
        servicePort: 80
horocrux commented 4 years ago

Hi @akshaysngupta, I had the same issue and I solved it by doing your recomendation, but why is needed the "/" route?, What if I need to use always a path to point to my services, should I put a dummy service with "/" route?, Whats is your recommendation in that escenario?

@nreddipalle You have to specify a ingress rule for path /. That is used to set the default backend pool and default backend http settting in Path-based rule.

Try modify your existing ingress yaml by changing /tasks/ -> /

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: tasks-dev-ingress
  namespace: tasks-dev
annotations:
  kubernetes.io/ingress.class: azure/application-gateway
  appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
spec:
  tls:
    - hosts:
      - senseimsvctasksweu-dev.senseilabs.com
      secretName: sensei-ingress-tls
  rules:
  - host: senseimsvctasksweu-dev.senseilabs.com
    http:
    paths:
      path: /
      backend:
        serviceName: web-ui
        servicePort: 80