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

Failed build model due to couldn't auto-discover subnets: unable to discover at least one subnet #3051

Closed dv000-7 closed 1 year ago

dv000-7 commented 1 year ago

Describe the bug

I am trying to deploy alb(ingress) . application is getting deployed but load balancer is not creating showing error "Failed build model due to couldn't auto-discover subnets: unable to discover at least one subnet. " Steps to reproduce

  1. deploy eks cluster
  2. helm repo add eks https://aws.github.io/eks-charts
  3. kubectl apply -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller//crds?ref=master" 4.helm upgrade -i aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName= --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller

Expected outcome Normal SuccessfullyReconciled targetgroupbinding/k8s-default-appname-ad8ee871f8 Successfully reconciled but getting Warning FailedBuildModel ingress/appname Failed build model due to couldn't auto-discover subnets: unable to discover at least one subnet.

Environment

Additional Context:

oliviassss commented 1 year ago

Hi, you need to set the clusterName, but you leave it empty in your command. Any specific reason?

dv000-7 commented 1 year ago

hello, i have given clustername in my cli helm upgrade -i aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=testapp-cluster --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller

oliviassss commented 1 year ago

Can you pls check if your subnets are properly tagged?

You can check our live doc for more ref: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/deploy/subnet_discovery/ Also some similar issue: https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2812

Let me know if these can address your issue.

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

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active 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 rotten

oliviassss commented 1 year ago

@dv000-7, I'm closing this issue as for now, please feel free to reach out or reopen if you have any questions. Thanks.