Aws-load-balancer-controller: different healthcheck PATH for different target group

Created on 30 Oct 2019  路  9Comments  路  Source: kubernetes-sigs/aws-load-balancer-controller

I am running multiple pods , node app, java app on k8s and using ALB ingress controller with different paths, but I have different healthcheck urls like /health for TG1, /actuator for TG2, /status for TG3.

I have tried using this annotation alb.ingress.kubernetes.io/healthcheck-path: /ping but this add /ping to all the TGs, how can i pass different healthcheck-path for different target group, pls advice

lifecyclrotten

Most helpful comment

Absolutely, instead of set the annotation into kind Ingress

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ...
    alb.ingress.kubernetes.io/healthcheck-path: /ping
    ...

You can set health check into the kind Service, in the same way

apiVersion: v1
kind: Service
metadata:
  annotations:
    ...
    alb.ingress.kubernetes.io/healthcheck-path: /ping
    ...

All 9 comments

You should set the annotation at the Service Object level, not Ingress Object

@Eraac thanks for the response, can you give me more info/example please? you mean the service.yml needs to be defined with healthchecks instead of ingress ?

Absolutely, instead of set the annotation into kind Ingress

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ...
    alb.ingress.kubernetes.io/healthcheck-path: /ping
    ...

You can set health check into the kind Service, in the same way

apiVersion: v1
kind: Service
metadata:
  annotations:
    ...
    alb.ingress.kubernetes.io/healthcheck-path: /ping
    ...

Thanks @Eraac problem resolved for me on other issue. https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/1073

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Eraac thanks , it is working fine

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brylex418 picture brylex418  路  4Comments

joseppla picture joseppla  路  5Comments

benwilson512 picture benwilson512  路  5Comments

khacminh picture khacminh  路  3Comments

gigi-at-zymergen picture gigi-at-zymergen  路  5Comments