Aws-load-balancer-controller: Health Checks do not work if using multiple pods on routes

Created on 10 May 2017  路  8Comments  路  Source: kubernetes-sigs/aws-load-balancer-controller

e.g

  • host: test.com
    http:
    paths:

    • path: "/api/"

      backend:

      serviceName: api

      servicePort: 80

    • path: "/"

      backend:

      serviceName: frontend

      servicePort: 80

You can only set one health-check on the ingress so if service api does not have the same route for a health check as frontend you get a unable system

kinfeature

Most helpful comment

Works brilliantly
All i needed to do was move the following from my ingress to my Service definition of the app

alb.ingress.kubernetes.io/healthcheck-path: "/svc/status"
alb.ingress.kubernetes.io/successCodes: "200"

All 8 comments

Maybe do what the google ingress controller does and use the health checks of the pods?

Do you have any ideas of how you would like to see it configured?

@bigkraig I believe annotations on the service would be the easiest way.

All annotations to configure a listener should be done on the service the k8s way.

See SSL support on AWS here: https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws

So, just move all the following to the service definition, and if present, override anything listed in the ingress:

alb.ingress.kubernetes.io/backend-protocol
alb.ingress.kubernetes.io/certificate-arn
alb.ingress.kubernetes.io/healthcheck-interval-seconds
alb.ingress.kubernetes.io/healthcheck-path
alb.ingress.kubernetes.io/healthcheck-port
alb.ingress.kubernetes.io/healthcheck-protocol
alb.ingress.kubernetes.io/healthcheck-timeout-seconds
alb.ingress.kubernetes.io/healthy-threshold-count
alb.ingress.kubernetes.io/unhealthy-threshold-count
alb.ingress.kubernetes.io/listen-ports
alb.ingress.kubernetes.io/security-groups
alb.ingress.kubernetes.io/subnets
alb.ingress.kubernetes.io/successCodes
alb.ingress.kubernetes.io/tags

@sundryp I've got this covered for the annotations that would effect a TG. Some of the other annotations in your list didn't apply on service resources.

@owenhaynes hopefully this helps!

alb.ingress.kubernetes.io/backend-protocol
alb.ingress.kubernetes.io/healthcheck-interval-seconds
alb.ingress.kubernetes.io/healthcheck-path
alb.ingress.kubernetes.io/healthcheck-port
alb.ingress.kubernetes.io/healthcheck-protocol
alb.ingress.kubernetes.io/healthcheck-timeout-seconds
alb.ingress.kubernetes.io/healthy-threshold-count
alb.ingress.kubernetes.io/unhealthy-threshold-count
alb.ingress.kubernetes.io/successCodes

@joshrosso
Can we expect a solution?

Supported as of #423, please use 1.0-beta.2 or later. thanks!

Works brilliantly
All i needed to do was move the following from my ingress to my Service definition of the app

alb.ingress.kubernetes.io/healthcheck-path: "/svc/status"
alb.ingress.kubernetes.io/successCodes: "200"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghostsquad picture ghostsquad  路  4Comments

NickEAVE picture NickEAVE  路  3Comments

madhu131313 picture madhu131313  路  3Comments

jwickens picture jwickens  路  4Comments

brylex418 picture brylex418  路  4Comments