You need a Service reachable from inside a VPC but not the internet on EKS. How?
IntermediateScenarioServices, Ingress and DNS
Answer
Situation read → An internal gRPC service needs a private load balancer.
What I'd do →
- Set annotation
service.beta.kubernetes.io/aws-load-balancer-scheme: internal - Use
aws-load-balancer-type: externalwithnlb-target-type: ipand the AWS Load Balancer Controller - Ensure private subnets are tagged
kubernetes.io/role/internal-elb=1 - Restrict with security groups
- Verify with
kubectl get svcthat the hostname resolves to private IPs
Why → The controller reads the subnet tags and annotations to place the LB in the right subnets and scheme.
Interview tip → Mention that instance target type goes via NodePort, IP mode goes straight to pods.
More on Services, Ingress and DNS
A Service has no endpoints. How do you find out why?BeginnerWhen do you use ClusterIP, NodePort, LoadBalancer and ExternalName?BeginnerTraffic to a Service works from some pods but times out from others. How do you debug it?AdvancedYou want to expose three HTTP services under one hostname with different paths. How?Intermediateingress-nginx returns 404 for a new host. What do you check?Intermediateingress-nginx returns 502 or 503 intermittently. What are the likely reasons?Intermediate