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
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
Most helpful comment
Absolutely, instead of set the annotation into kind Ingress
You can set health check into the kind Service, in the same way