kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.49k stars 8.25k forks source link

Ingress Nginx - AWS ALB health check / return 404 with Target Group Binding #9414

Closed quadrinho closed 2 months ago

quadrinho commented 1 year ago

What happened:

Hello,

we try to add with ingress-nginx the object Target Group Binding (from AWS Load Balancer Controller) to use an existing Application Load Balancer Controller.

This is the Target Group Binding used:

apiVersion: elbv2.k8s.aws/v1beta1
kind: TargetGroupBinding
metadata:
  name: my-tgb-ingress
spec:
  serviceRef:
    name: ingress-nginx-controller # route traffic to the awesome-service
    port: 80
  targetGroupARN: arn:aws:elasticloadbalancing:eu-central-1:XXXXXX:targetgroup/argocd2-manual/531e601337226fdf

The problem is that the health check in the target group is done using http call to "/" and nginx returns 404

What you expected to happen:

Is it possible to configure some values in the nginx chart to not reply 404 to the Balancer?

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.): Chart version 4.2.3

Kubernetes version (use kubectl version): 1.23

Environment:

k8s-ci-robot commented 1 year ago

@quadrinho: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
longwuyuan commented 1 year ago

/remove-kind bug

The recommended configuration is to use NLB https://kubernetes.github.io/ingress-nginx/deploy/#aws

pcothenet commented 1 year ago

@quadrinho have you tried to configure your target group directly to change the health check target?

By default ingress-nginx seem to use /healtz as the default health path on port 10254. You should configure your target group to use that.

Screenshot 2023-04-21 at 11 43 53 AM
longwuyuan commented 2 months ago

We are unable to support ALB as its Layer7

/close

k8s-ci-robot commented 2 months ago

@longwuyuan: Closing this issue.

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/9414#issuecomment-2337443143): >We are unable to support ALB as its Layer7 > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.