aws-load-balancer-controller icon indicating copy to clipboard operation
aws-load-balancer-controller copied to clipboard

Invalid ingress class: IngressClass.networking.k8s.io "alb" not found

Open owyah opened this issue 3 years ago • 3 comments

Describe the bug I got this error when apply https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.3/docs/examples/2048/2048_full.yaml

Steps to reproduce I follow this tutorial:

  • https://www.youtube.com/watch?v=TUS8KWaGKco
  • https://aws.amazon.com/premiumsupport/knowledge-center/eks-alb-ingress-controller-setup/

Expected outcome successful install ingress

Environment

  • AWS Load Balancer controller version: v2.4.3
  • Kubernetes version: Major:"1", Minor:"22+", GitVersion:"v1.22.11-eks-18ef993"
  • Using EKS version: v1.22.12-eks-ba74326

Additional Context: Is there any setup step that I missed?

owyah avatar Sep 23 '22 00:09 owyah

@owyah, did you install the controller via manifests instead of helm chart? If so, can you verify you have the ingress class named alb in your cluster?

You can apply the following manifest for ingress class and params: https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/download/v2.4.3/v2_4_3_ingclass.yaml

kishorj avatar Sep 23 '22 18:09 kishorj

@kishorj I use manifests, based on the tutorial. I do not know yet about helm chart. I confused because to many manifest that should I apply.

I have been tried, and the game has been created. But I got a new problem:

{"level":"error","ts":1664071817.9159486,"logger":"controller-runtime.manager.controller.ingress","msg":"Reconciler error","name":"ingress-2048","namespace":"game-2048","error":"WebIdentityErr: failed to retrieve credentials\ncaused by: AccessDenied: Not authorized to perform sts:AssumeRoleWithWebIdentity\n\tstatus code: 403, request id: bb3a6e5b-fed9-484a-a6e4-592cbaae18a2"}

Why is this happening?

Thank you for your response.

owyah avatar Sep 24 '22 22:09 owyah

In v2.4.3 patch release, we separated the IngressClass and IngressClassParams from the full manifest due to race condition with the kubectl apply - issue #2672.

Starting recent v2.4.4 patch release, we stripped down the IngressClassParams reference from the IngressClass and included in the full manifest. You should be apply just the full manifest in this case - https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/download/v2.4.4/v2_4_4_full.yaml

kishorj avatar Sep 27 '22 20:09 kishorj

@owyah, I'm closing the issue since recent releases have a separate manifest for IngressClassParams.

kishorj avatar Nov 30 '22 00:11 kishorj

Also had this same issue stemming from the AWS tutorial and documentation. Using the latest available version (currently 2.6.2) causes a failure with creating the alb ingress class. You have to use 2.4.1 in the video for this to work. Please update the documentation in the video tutorial and blog post here accordingly:

https://repost.aws/knowledge-center/eks-alb-ingress-controller-setup#

grahamschuckman avatar Dec 03 '23 22:12 grahamschuckman