aws eks ALB, NLB error: service Failed build model due to unable to resolve at least one subnet
EKS AWS LBC is not able to auto-discover subnets


https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.5/deploy/subnet_discovery/
---
Public subnets¶
Public subnets are used for internet-facing load balancers. These subnets must have the following tags:
Key | Value |
kubernetes.io/role/elb | 1 or `` |
Private subnets¶
Private subnets are used for internal load balancers. These subnets must have the following tags:
Key | Value |
kubernetes.io/role/internal-elb | 1 or `` |
Common tag¶
In version v2.1.1 and older of the LBC, both the public and private subnets must be tagged with the cluster name as follows:
Key | Value |
kubernetes.io/cluster/${cluster-name} | owned or shared |
But the subnet tags are already well set up.
and i finally find below answer.

https://stackoverflow.com/questions/66039501/eks-alb-is-not-to-able-to-auto-discover-subnets
kubectl get deployment -n kube-system aws-load-balancer-controller -oyaml |grep "cluster-name"
...
when install aws loadbalancer controller with helm, didn't update current eks-cluster-name
kubectl edit deployment -n kube-system aws-load-balancer-controller
or
helm upgrade ~
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedBuildModel 9m15s (x2 over 14m) service Failed build model due to unable to resolve at least one subnet
Normal SuccessfullyReconciled 7m3s service Successfully reconciled
---
other issue
AWS ALB, subnet CIDR 범위로 인한 문제(unable to discover at least one subnet)
위 패키지를 이용해서 ALB ingress를 사용하고 있다.
keyhyuk-kim.medium.com
subnet cidr is too small
1. Confirm that you have at least two subnets in two different Availability Zones, which is a requirement for creating an Application Load Balancer.Note: You can create a Network Load Balancer with a single subnet.
2. For each subnet, specify a CIDR block with at least a /27 bitmask (for example: 10.0.0.0/27) and at least eight free IP addresses.
3. Confirm that the tags on the subnets are formatted correctly. For example, the tags must not have any leading or trailing spaces.