You want to expose three HTTP services under one hostname with different paths. How?
IntermediateScenarioServices, Ingress and DNS
Answer
Situation read → /api, /web and /admin must share app.example.com and one load balancer.
What I'd do →
- Install an ingress controller such as ingress-nginx or the AWS Load Balancer Controller
- Create an Ingress with
rules.hostand threepathswithpathType: Prefix - Add TLS using a cert-manager Certificate and
tls.secretName - Use annotations only for controller-specific behaviour
- Test with
curl -H 'Host: app.example.com' http://<lb>/api
Why → One L7 entry point routes by host and path, saving LBs and centralising TLS.
Interview tip → Mention Gateway API (GA) as the successor with HTTPRoute and role separation.
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?Advancedingress-nginx returns 404 for a new host. What do you check?Intermediateingress-nginx returns 502 or 503 intermittently. What are the likely reasons?IntermediateA pod cannot resolve `my-svc` but can reach the pod IP. What do you test first?Beginner