A team exposes several HTTP municipal apps publicly via many NodePorts and wants cleaner hostname-based routing on standard ports. Which change best matches that goal?
Select an answer to reveal the explanation.
Short Explanation
NodePorts are like making visitors memorize random side doors. Ingress puts a proper front desk on 80/443 with hostnames. For HTTP apps, that is the cleaner public entry pattern.
Full Explanation
A team exposing several HTTP municipal apps publicly via many NodePorts and wanting cleaner hostname-based routing on standard ports should introduce an Ingress (with a controller) for host-based HTTP routing instead of relying on raw public NodePorts. Ingress consolidates HTTP entry on ports 80/443 with host rules, so citizens reach parks.city.example rather than memorizing nodeIP:3xxxx values for each department app.
Converting every Service to headless and publishing each Pod IP in DNS manuals is operationally hostile and still not hostname-based edge routing. Setting publishNotReadyAddresses on every Service does not turn NodePorts into hostnames. Using only emptyDir volumes to publish HTTP routes across nodes is not an HTTP routing mechanism at all.
Exam caveat: Ingress requires a working controller; NodePort may remain appropriate for non-HTTP or temporary lab access. Operational check: ensure IngressClass/controller exists, create host-based Ingress objects pointing at the app Services, update public DNS to the controller or load balancer address, and retire unnecessary public NodePorts. Track the migration in the city’s edge exposure inventory so security reviews see fewer open high ports.