Interview Prep/Kubernetes/Services, Ingress and DNS

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 →

  1. Set annotation service.beta.kubernetes.io/aws-load-balancer-scheme: internal
  2. Use aws-load-balancer-type: external with nlb-target-type: ip and the AWS Load Balancer Controller
  3. Ensure private subnets are tagged kubernetes.io/role/internal-elb=1
  4. Restrict with security groups
  5. Verify with kubectl get svc that 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.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Services, Ingress and DNS