kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.93k stars 1.46k forks source link

How to check ingress log on AWS? #3102

Closed zibuyule closed 1 year ago

zibuyule commented 1 year ago

When I created an ingress resource as follows, I got 502 when I accessed it in the browser. And I access it from another pod within kubernetes and it seems to be working normally. keycloak-error

pod

How can I check for this error?

First, I tried checking the logs of pod: aws-load-balancer-controller-79f55f66d6-rvkwn. It looks like it only prints the logs for creating the AWS ALB.

aws-load-balancer-controller log

So where do I go to check the access logs?

Thanks!

oliviassss commented 1 year ago

Hi can you check if the target groups are up and healthy? You can go to AWS console, EC2 -> Target Groups and click on the corresponding TG.

kishorj commented 1 year ago

@zibuyule, you could enable access logs on your ALB, and get the logs from S3. For details, please refer to setting the load balancer attributes: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/ingress/annotations/#load-balancer-attributes

ArjunDandagi commented 1 year ago

I have a feeling that you are using ALB and ingress resources . but the service is ClusterIP and you are not using aws VPC CNI

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

oliviassss commented 1 year ago

@zibuyule, I'm closing the issue as for now, please feel free to reach out or reopen if you have more questions. Thanks