Interview Prep/Kubernetes/EKS-specific issues

The AWS Load Balancer Controller never creates an ALB and logs `Failed build model due to couldn't auto-discover subnets: unable to resolve at least one subnet (0 match VPC and tags: [kubernetes.io/role/elb])`.

IntermediateTroubleshootingEKS-specific issues
Answer

Likely causes → Subnet auto-discovery relies on tags. Public subnets need kubernetes.io/role/elb=1, private ones kubernetes.io/role/internal-elb=1; at least two AZs are required for an ALB.

Diagnose →

kubectl logs -n kube-system deploy/aws-load-balancer-controller --tail=100 | grep -i subnet
aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-0abc --query 'Subnets[].[SubnetId,AvailabilityZone,Tags]'

Fix → Tag the subnets, or list them explicitly on the Ingress with alb.ingress.kubernetes.io/subnets: subnet-0a,subnet-0b.

Prevent → Subnet tags in the VPC Terraform module; a controller smoke test after cluster creation.

All Kubernetes questions

More on EKS-specific issues